You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by so...@apache.org on 2016/05/20 23:11:05 UTC

[trafficserver] 09/28: WebSocket timeouts: transaction overrideable

This is an automated email from the ASF dual-hosted git repository.

sorber pushed a commit to branch 6.2.x
in repository https://git-dual.apache.org/repos/asf/trafficserver.git

commit 2fd83d76d67bff35c855efa3ff86354e3ac3b6f5
Author: Brian Geffon <br...@apache.org>
AuthorDate: Wed Sep 23 21:39:01 2015 -0700

    WebSocket timeouts: transaction overrideable
    
    (cherry picked from commit f30ae30ecdffd6d18b9f75fb91874da85d70b113)
---
 .../api/functions/TSHttpOverridableConfig.en.rst               |  2 ++
 lib/ts/apidefs.h.in                                            |  2 ++
 proxy/InkAPI.cc                                                | 10 ++++++++++
 3 files changed, 14 insertions(+)

diff --git a/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst b/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst
index c94aaa4..26c47cc 100644
--- a/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst
+++ b/doc/developer-guide/api/functions/TSHttpOverridableConfig.en.rst
@@ -107,6 +107,8 @@ The following configurations (from ``records.config``) are overridable.
 |   :ts:cv:`proxy.config.http.transaction_no_activity_timeout_in`
 |   :ts:cv:`proxy.config.http.transaction_no_activity_timeout_out`
 |   :ts:cv:`proxy.config.http.transaction_active_timeout_out`
+|   :ts:cv:`proxy.config.websocket.no_activity_timeout`
+|   :ts:cv:`proxy.config.websocket.active_timeout`
 |   :ts:cv:`proxy.config.http.origin_max_connections`
 |   :ts:cv:`proxy.config.http.connect_attempts_max_retries`
 |   :ts:cv:`proxy.config.http.connect_attempts_max_retries_dead_server`
diff --git a/lib/ts/apidefs.h.in b/lib/ts/apidefs.h.in
index cbd47a9..b876e99 100644
--- a/lib/ts/apidefs.h.in
+++ b/lib/ts/apidefs.h.in
@@ -695,6 +695,8 @@ typedef enum {
   TS_CONFIG_HTTP_REDIRECT_USE_ORIG_CACHE_KEY,
   TS_CONFIG_HTTP_ATTACH_SERVER_SESSION_TO_CLIENT,
   TS_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS_QUEUE,
+  TS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT,
+  TS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT,
   TS_CONFIG_LAST_ENTRY
 } TSOverridableConfigKey;
 
diff --git a/proxy/InkAPI.cc b/proxy/InkAPI.cc
index f32f7d5..bbcdcdd 100644
--- a/proxy/InkAPI.cc
+++ b/proxy/InkAPI.cc
@@ -7904,6 +7904,12 @@ _conf_to_memberp(TSOverridableConfigKey conf, OverridableHttpConfigParams *overr
   case TS_CONFIG_SSL_HSTS_INCLUDE_SUBDOMAINS:
     ret = &overridableHttpConfig->proxy_response_hsts_include_subdomains;
     break;
+  case TS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT:
+    ret = &overridableHttpConfig->websocket_active_timeout;
+    break;
+  case TS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT:
+    ret = &overridableHttpConfig->websocket_inactive_timeout;
+    break;
   case TS_CONFIG_HTTP_CACHE_OPEN_READ_RETRY_TIME:
     typ = OVERRIDABLE_TYPE_INT;
     ret = &overridableHttpConfig->cache_open_read_retry_time;
@@ -8254,6 +8260,8 @@ TSHttpTxnConfigFind(const char *name, int length, TSOverridableConfigKey *conf,
         cnf = TS_CONFIG_NET_SOCK_OPTION_FLAG_OUT;
       else if (!strncmp(name, "proxy.config.net.sock_packet_mark_out", length))
         cnf = TS_CONFIG_NET_SOCK_PACKET_MARK_OUT;
+      else if (!strncmp(name, "proxy.config.websocket.active_timeout", length))
+        cnf = TS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT;
       break;
     }
     break;
@@ -8384,6 +8392,8 @@ TSHttpTxnConfigFind(const char *name, int length, TSOverridableConfigKey *conf,
         cnf = TS_CONFIG_NET_SOCK_SEND_BUFFER_SIZE_OUT;
       else if (!strncmp(name, "proxy.config.http.connect_attempts_timeout", length))
         cnf = TS_CONFIG_HTTP_CONNECT_ATTEMPTS_TIMEOUT;
+      else if (!strncmp(name, "proxy.config.websocket.no_activity_timeout", length))
+        cnf = TS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT;
       break;
     }
     break;

-- 
To stop receiving notification emails like this one, please contact
"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>.