Changeset 2966 for pjproject/trunk/pjsip/include/pjsip/sip_transport_tcp.h
- Timestamp:
- Oct 25, 2009 9:02:07 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/include/pjsip/sip_transport_tcp.h
r2394 r2966 27 27 28 28 #include <pjsip/sip_transport.h> 29 #include <pj/sock_qos.h> 29 30 30 31 … … 43 44 * the transport to the framework. 44 45 */ 46 47 /** 48 * Settings to be specified when creating the TCP transport. Application 49 * should initialize this structure with its default values by calling 50 * pjsip_tcp_transport_cfg_default(). 51 */ 52 typedef struct pjsip_tcp_transport_cfg 53 { 54 /** 55 * Address family to use. Valid values are pj_AF_INET() and 56 * pj_AF_INET6(). Default is pj_AF_INET(). 57 */ 58 int af; 59 60 /** 61 * Optional address to bind the socket to. Default is to bind to 62 * PJ_INADDR_ANY and to any available port. 63 */ 64 pj_sockaddr bind_addr; 65 66 /** 67 * Optional published address, which is the address to be 68 * advertised as the address of this SIP transport. 69 * By default the bound address will be used as the published address. 70 */ 71 pjsip_host_port addr_name; 72 73 /** 74 * Number of simultaneous asynchronous accept() operations to be 75 * supported. It is recommended that the number here corresponds to 76 * the number of processors in the system (or the number of SIP 77 * worker threads). 78 * 79 * Default: 1 80 */ 81 unsigned async_cnt; 82 83 /** 84 * QoS traffic type to be set on this transport. When application wants 85 * to apply QoS tagging to the transport, it's preferable to set this 86 * field rather than \a qos_param fields since this is more portable. 87 * 88 * Default is QoS not set. 89 */ 90 pj_qos_type qos_type; 91 92 /** 93 * Set the low level QoS parameters to the transport. This is a lower 94 * level operation than setting the \a qos_type field and may not be 95 * supported on all platforms. 96 * 97 * Default is QoS not set. 98 */ 99 pj_qos_params qos_params; 100 101 } pjsip_tcp_transport_cfg; 102 103 104 /** 105 * Initialize pjsip_tcp_transport_cfg structure with default values for 106 * the specifed address family. 107 * 108 * @param cfg The structure to initialize. 109 * @param af Address family to be used. 110 */ 111 PJ_DECL(void) pjsip_tcp_transport_cfg_default(pjsip_tcp_transport_cfg *cfg, 112 int af); 113 45 114 46 115 /** … … 111 180 pjsip_tpfactory **p_factory); 112 181 182 /** 183 * Another variant of #pjsip_tcp_transport_start(). 184 * 185 * @param endpt The SIP endpoint. 186 * @param cfg TCP transport settings. Application should initialize 187 * this setting with #pjsip_tcp_transport_cfg_default(). 188 * @param p_factory Optional pointer to receive the instance of the 189 * SIP TCP transport factory just created. 190 * 191 * @return PJ_SUCCESS when the transport has been successfully 192 * started and registered to transport manager, or 193 * the appropriate error code. 194 */ 195 PJ_DECL(pj_status_t) pjsip_tcp_transport_start3( 196 pjsip_endpoint *endpt, 197 const pjsip_tcp_transport_cfg *cfg, 198 pjsip_tpfactory **p_factory 199 ); 113 200 114 201
Note: See TracChangeset
for help on using the changeset viewer.