diff options
Diffstat (limited to 'pjsip/include/pjsip/sip_transport_tcp.h')
-rw-r--r-- | pjsip/include/pjsip/sip_transport_tcp.h | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/pjsip/include/pjsip/sip_transport_tcp.h b/pjsip/include/pjsip/sip_transport_tcp.h index 317d7772..4f5664d4 100644 --- a/pjsip/include/pjsip/sip_transport_tcp.h +++ b/pjsip/include/pjsip/sip_transport_tcp.h @@ -38,11 +38,35 @@ PJ_BEGIN_DECL */ /** - * Create, register, and start TCP transport. + * The TCP incoming connection backlog number. + * Default: 5 + */ +#ifndef PJSIP_TCP_TRANSPORT_BACKLOG +# define PJSIP_TCP_TRANSPORT_BACKLOG 5 +#endif + + +/** + * Register support for SIP TCP transport by creating TCP listener on + * the specified address and port. This function will create an + * instance of SIP TCP transport factory and register it to the + * transport manager. * * @param endpt The SIP endpoint. - * @param local Local address to bind. - * @param async_cnt Number of simultaneous async operations. + * @param local Optional local address to bind, or specify the + * address to bind the server socket to. Both IP + * interface address and port fields are optional. + * If IP interface address is not specified, socket + * will be bound to PJ_INADDR_ANY. If port is not + * specified, socket will be bound to any port + * selected by the operating system. + * @param async_cnt Number of simultaneous asynchronous accept() + * operations to be supported. It is recommended that + * the number here corresponds to the number of + * processors in the system (or the number of SIP + * worker threads). + * @param p_factory Optional pointer to receive the instance of the + * SIP TCP transport factory just created. * * @return PJ_SUCCESS when the transport has been successfully * started and registered to transport manager, or @@ -50,7 +74,8 @@ PJ_BEGIN_DECL */ PJ_DECL(pj_status_t) pjsip_tcp_transport_start(pjsip_endpoint *endpt, const pj_sockaddr_in *local, - unsigned async_cnt); + unsigned async_cnt, + pjsip_tpfactory **p_factory); PJ_END_DECL |