diff options
author | Liong Sauw Ming <ming@teluu.com> | 2015-08-07 09:00:52 +0000 |
---|---|---|
committer | Liong Sauw Ming <ming@teluu.com> | 2015-08-07 09:00:52 +0000 |
commit | 74acf75a496b739a6a9e47eedb91891f18d4085b (patch) | |
tree | 3cd09b9df53bf6dc8029a9e9daa5e1e32cddb0e8 /pjsip/include | |
parent | 332c08359c2214f170722229a8c7864f72b5c666 (diff) |
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
Diffstat (limited to 'pjsip/include')
-rw-r--r-- | pjsip/include/pjsip/sip_config.h | 40 |
1 files changed, 40 insertions, 0 deletions
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 @@ -670,6 +670,46 @@ PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void) /** + * 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. * |