This source file includes following definitions.
- unused_idle_socket_timeout
- set_unused_idle_socket_timeout
- used_idle_socket_timeout
- set_used_idle_socket_timeout
#include "net/socket/client_socket_pool.h"
#include "base/logging.h"
namespace {
int g_unused_idle_socket_timeout_s = 10;
int g_used_idle_socket_timeout_s = 300;
}
namespace net {
base::TimeDelta ClientSocketPool::unused_idle_socket_timeout() {
return base::TimeDelta::FromSeconds(g_unused_idle_socket_timeout_s);
}
void ClientSocketPool::set_unused_idle_socket_timeout(base::TimeDelta timeout) {
DCHECK_GT(timeout.InSeconds(), 0);
g_unused_idle_socket_timeout_s = timeout.InSeconds();
}
base::TimeDelta ClientSocketPool::used_idle_socket_timeout() {
return base::TimeDelta::FromSeconds(g_used_idle_socket_timeout_s);
}
void ClientSocketPool::set_used_idle_socket_timeout(base::TimeDelta timeout) {
DCHECK_GT(timeout.InSeconds(), 0);
g_used_idle_socket_timeout_s = timeout.InSeconds();
}
ClientSocketPool::ClientSocketPool() {}
ClientSocketPool::~ClientSocketPool() {}
}