summaryrefslogtreecommitdiff
path: root/pjsip/include
diff options
context:
space:
mode:
authorLiong Sauw Ming <ming@teluu.com>2015-05-11 05:57:50 +0000
committerLiong Sauw Ming <ming@teluu.com>2015-05-11 05:57:50 +0000
commitccf97961a75679ae321352735896f9db46032ab7 (patch)
tree6702ba80e32acf48a7f9cd79571b7115c8ac289f /pjsip/include
parentbabf151e91586b89c9f1be56dd5fe0505796e6dc (diff)
Fixed #1851: Runtime configuration of TCP and TLS keep alive intervals
Thanks to Michele Cicciotti for the patch. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@5090 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r--pjsip/include/pjsip/sip_config.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/pjsip/include/pjsip/sip_config.h b/pjsip/include/pjsip/sip_config.h
index 3fd0e41d..6036ba46 100644
--- a/pjsip/include/pjsip/sip_config.h
+++ b/pjsip/include/pjsip/sip_config.h
@@ -217,6 +217,30 @@ typedef struct pjsip_cfg_t
} regc;
+ /** TCP transport settings */
+ struct {
+ /**
+ * Set the interval to send keep-alive packet for TCP transports.
+ * If the value is zero, keep-alive will be disabled for TCP.
+ *
+ * Default is PJSIP_TCP_KEEP_ALIVE_INTERVAL.
+ */
+ long keep_alive_interval;
+
+ } tcp;
+
+ /** TLS transport settings */
+ struct {
+ /**
+ * Set the interval to send keep-alive packet for TLS transports.
+ * If the value is zero, keep-alive will be disabled for TLS.
+ *
+ * Default is PJSIP_TLS_KEEP_ALIVE_INTERVAL.
+ */
+ long keep_alive_interval;
+
+ } tls;
+
} pjsip_cfg_t;
@@ -649,6 +673,9 @@ PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void)
* Set the interval to send keep-alive packet for TCP transports.
* If the value is zero, keep-alive will be disabled for TCP.
*
+ * This option can be changed in run-time by settting
+ * \a tcp.keep_alive_interval field of pjsip_cfg().
+ *
* Default: 90 (seconds)
*
* @see PJSIP_TCP_KEEP_ALIVE_DATA
@@ -672,6 +699,9 @@ PJ_INLINE(pjsip_cfg_t*) pjsip_cfg(void)
* Set the interval to send keep-alive packet for TLS transports.
* If the value is zero, keep-alive will be disabled for TLS.
*
+ * This option can be changed in run-time by settting
+ * \a tls.keep_alive_interval field of pjsip_cfg().
+ *
* Default: 90 (seconds)
*
* @see PJSIP_TLS_KEEP_ALIVE_DATA