From 74acf75a496b739a6a9e47eedb91891f18d4085b Mon Sep 17 00:00:00 2001 From: Liong Sauw Ming Date: Fri, 7 Aug 2015 09:00:52 +0000 Subject: Fixed #1878: Compile time option for TCP/TLS transport to not create a listener git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5152 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip/include/pjsip/sip_config.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'pjsip/include') diff --git a/pjsip/include/pjsip/sip_config.h b/pjsip/include/pjsip/sip_config.h index 6036ba46..59da2a9f 100644 --- a/pjsip/include/pjsip/sip_config.h +++ b/pjsip/include/pjsip/sip_config.h @@ -669,6 +669,46 @@ PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void) #endif +/** + * Specify whether TCP transport should skip creating the listener. + * Not having a listener means that application will not be able to + * function in server mode and accept incoming connections. + * + * When enabling this setting, if you use PJSUA, it is recommended to set + * pjsua_acc_config.contact_use_src_port to PJ_TRUE. + * Warning: If contact_use_src_port is disabled or failed (because it's + * unsupported in some platforms or automatically turned off due to + * DNS server resolution), Contact header will be generated from + * pj_getipinterface()/pj_gethostip(), but the address will not be + * able to accept connections. + * + * Default is FALSE (listener will be created). + */ +#ifndef PJSIP_TCP_TRANSPORT_DONT_CREATE_LISTENER +# define PJSIP_TCP_TRANSPORT_DONT_CREATE_LISTENER 0 +#endif + + +/** + * Specify whether TLS transport should skip creating the listener. + * Not having a listener means that application will not be able to + * function in server mode and accept incoming connections. + * + * When enabling this setting, if you use PJSUA, it is recommended to set + * pjsua_acc_config.contact_use_src_port to PJ_TRUE. + * Warning: If contact_use_src_port is disabled or failed (because it's + * unsupported in some platforms or automatically turned off due to + * DNS server resolution), Contact header will be generated from + * pj_getipinterface()/pj_gethostip(), but the address will not be + * able to accept connections. + * + * Default is FALSE (listener will be created). + */ +#ifndef PJSIP_TLS_TRANSPORT_DONT_CREATE_LISTENER +# define PJSIP_TLS_TRANSPORT_DONT_CREATE_LISTENER 0 +#endif + + /** * Set the interval to send keep-alive packet for TCP transports. * If the value is zero, keep-alive will be disabled for TCP. -- cgit v1.2.3