BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJSIP Reference

pjsip_tpfactory Struct Reference

#include <sip_transport.h>

Public Member Functions

 PJ_DECL_LIST_MEMBER (struct pjsip_tpfactory)
 

Data Fields

char obj_name [PJ_MAX_OBJ_NAME]
 
pj_pool_tpool
 
pj_lock_tlock
 
pjsip_transport_type_e type
 
char * type_name
 
unsigned flag
 
char * info
 
pj_sockaddr local_addr
 
pjsip_host_port addr_name
 
pj_status_t(* create_transport )(pjsip_tpfactory *factory, pjsip_tpmgr *mgr, pjsip_endpoint *endpt, const pj_sockaddr *rem_addr, int addr_len, pjsip_transport **transport)
 
pj_status_t(* create_transport2 )(pjsip_tpfactory *factory, pjsip_tpmgr *mgr, pjsip_endpoint *endpt, const pj_sockaddr *rem_addr, int addr_len, pjsip_tx_data *tdata, pjsip_transport **transport)
 
pj_status_t(* destroy )(pjsip_tpfactory *factory)
 

Detailed Description

A transport factory is normally used for connection oriented transports (such as TCP or TLS) to create instances of transports. It registers a new transport type to the transport manager, and the transport manager would ask the factory to create a transport instance when it received command from application to send a SIP message using the specified transport type.

Member Function Documentation

◆ PJ_DECL_LIST_MEMBER()

pjsip_tpfactory::PJ_DECL_LIST_MEMBER ( struct pjsip_tpfactory  )

This list is managed by transport manager.

Field Documentation

◆ obj_name

char pjsip_tpfactory::obj_name[PJ_MAX_OBJ_NAME]

Name.

◆ pool

pj_pool_t* pjsip_tpfactory::pool

Owned memory pool.

◆ lock

pj_lock_t* pjsip_tpfactory::lock

Lock object.

◆ type

pjsip_transport_type_e pjsip_tpfactory::type

Transport type.

◆ type_name

char* pjsip_tpfactory::type_name

Type string name.

◆ flag

unsigned pjsip_tpfactory::flag

Transport flag.

◆ info

char* pjsip_tpfactory::info

Transport info/description.

◆ local_addr

pj_sockaddr pjsip_tpfactory::local_addr

Bound address.

◆ addr_name

pjsip_host_port pjsip_tpfactory::addr_name

Published name.

◆ create_transport

pj_status_t(* pjsip_tpfactory::create_transport) (pjsip_tpfactory *factory, pjsip_tpmgr *mgr, pjsip_endpoint *endpt, const pj_sockaddr *rem_addr, int addr_len, pjsip_transport **transport)

Create new outbound connection suitable for sending SIP message to specified remote address. Note that the factory is responsible for both creating the transport and registering it to the transport manager.

◆ create_transport2

pj_status_t(* pjsip_tpfactory::create_transport2) (pjsip_tpfactory *factory, pjsip_tpmgr *mgr, pjsip_endpoint *endpt, const pj_sockaddr *rem_addr, int addr_len, pjsip_tx_data *tdata, pjsip_transport **transport)

Create new outbound connection suitable for sending SIP message to specified remote address by also considering outgoing SIP message data. Note that the factory is responsible for both creating the transport and registering it to the transport manager.

◆ destroy

pj_status_t(* pjsip_tpfactory::destroy) (pjsip_tpfactory *factory)

Destroy the listener.


The documentation for this struct was generated from the following file:

 


PJSIP Open Source, high performance, small footprint, and very very portable SIP stack
Copyright (C) 2006-2008 Teluu Inc.