diff options
Diffstat (limited to 'net/socket/client_socket_pool.cc')
-rw-r--r-- | net/socket/client_socket_pool.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/net/socket/client_socket_pool.cc b/net/socket/client_socket_pool.cc new file mode 100644 index 0000000..4cefe8d --- /dev/null +++ b/net/socket/client_socket_pool.cc @@ -0,0 +1,29 @@ +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/socket/client_socket_pool.h"
+
+namespace {
+
+// The maximum duration, in seconds, to keep used idle persistent sockets
+// alive.
+// TODO(ziadh): Change this timeout after getting histogram data on how long it
+// should be.
+int g_unused_idle_socket_timeout = 10;
+
+} // namespace
+
+namespace net {
+
+// static
+int ClientSocketPool::unused_idle_socket_timeout() {
+ return g_unused_idle_socket_timeout;
+}
+
+// static
+void ClientSocketPool::set_unused_idle_socket_timeout(int timeout) {
+ g_unused_idle_socket_timeout = timeout;
+}
+
+} // namespace net
|