diff options
author | Benny Prijono <bennylp@teluu.com> | 2007-10-04 09:50:36 +0000 |
---|---|---|
committer | Benny Prijono <bennylp@teluu.com> | 2007-10-04 09:50:36 +0000 |
commit | e27b8a021b6768b20189ba7c9e3d8ba303172010 (patch) | |
tree | 4ce4a9f1fee4cddfcbd8de2251507a762e39505d /pjsip/include/pjsip/sip_config.h | |
parent | 5a17c9a249ae2804b3b0ae558a0a63275ef14259 (diff) |
Ticket #95: Keep-alive mechanism for TCP and TLS transports
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@1473 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsip/sip_config.h')
-rw-r--r-- | pjsip/include/pjsip/sip_config.h | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/pjsip/include/pjsip/sip_config.h b/pjsip/include/pjsip/sip_config.h index 846c2a57..3d386097 100644 --- a/pjsip/include/pjsip/sip_config.h +++ b/pjsip/include/pjsip/sip_config.h @@ -265,10 +265,10 @@ * Idle timeout interval to be applied to transports with no usage * before the transport is destroyed. Value is in seconds. * - * Default: 60 + * Default: 600 */ #ifndef PJSIP_TRANSPORT_IDLE_TIME -# define PJSIP_TRANSPORT_IDLE_TIME 60 +# define PJSIP_TRANSPORT_IDLE_TIME 600 #endif @@ -298,6 +298,52 @@ /** + * Set the interval to send keep-alive packet for TCP transports. + * If the value is zero, keep-alive will be disabled for TCP. + * + * Default: 90 (seconds) + * + * @see PJSIP_TCP_KEEP_ALIVE_DATA + */ +#ifndef PJSIP_TCP_KEEP_ALIVE_INTERVAL +# define PJSIP_TCP_KEEP_ALIVE_INTERVAL 90 +#endif + + +/** + * Set the payload of the TCP keep-alive packet. + * + * Default: CRLF + */ +#ifndef PJSIP_TCP_KEEP_ALIVE_DATA +# define PJSIP_TCP_KEEP_ALIVE_DATA { "\r\n", 2 } +#endif + + +/** + * Set the interval to send keep-alive packet for TLS transports. + * If the value is zero, keep-alive will be disabled for TLS. + * + * Default: 90 (seconds) + * + * @see PJSIP_TLS_KEEP_ALIVE_DATA + */ +#ifndef PJSIP_TLS_KEEP_ALIVE_INTERVAL +# define PJSIP_TLS_KEEP_ALIVE_INTERVAL 90 +#endif + + +/** + * Set the payload of the TLS keep-alive packet. + * + * Default: CRLF + */ +#ifndef PJSIP_TLS_KEEP_ALIVE_DATA +# define PJSIP_TLS_KEEP_ALIVE_DATA { "\r\n", 2 } +#endif + + +/** * This macro specifies whether full DNS resolution should be used. * When enabled, #pjsip_resolve() will perform asynchronous DNS SRV and * A (or AAAA, when IPv6 is supported) resolution to resolve the SIP |