diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-25 00:31:35 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-25 00:31:35 +0000 |
commit | 0cc0232e7467680ac07992ffe56910b52aab977a (patch) | |
tree | 3abef7af6d68c9fd09c0622b91f1cf9b5f9e5dc2 /net/socket/tcp_client_socket_win.cc | |
parent | 3255b9efa9bdb6040278b6ef38e17060e60b0a72 (diff) | |
download | chromium_src-0cc0232e7467680ac07992ffe56910b52aab977a.zip chromium_src-0cc0232e7467680ac07992ffe56910b52aab977a.tar.gz chromium_src-0cc0232e7467680ac07992ffe56910b52aab977a.tar.bz2 |
Revert 72421 (broke tests) - Enable TCP Keep-Alive packets for Windows.
45s until first TCP Keep-Alive and 45s in between keep alives.
BUG=27400
TEST=Run Wireshark, make sure TCP Keep-Alive packets are sent.
Review URL: http://codereview.chromium.org/6300013
TBR=willchan@chromium.org
Review URL: http://codereview.chromium.org/6371010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72426 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket/tcp_client_socket_win.cc')
-rw-r--r-- | net/socket/tcp_client_socket_win.cc | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/net/socket/tcp_client_socket_win.cc b/net/socket/tcp_client_socket_win.cc index b535636..e8b2f53 100644 --- a/net/socket/tcp_client_socket_win.cc +++ b/net/socket/tcp_client_socket_win.cc @@ -4,8 +4,6 @@ #include "net/socket/tcp_client_socket_win.h" -#include <mstcpip.h> - #include "base/basictypes.h" #include "base/compiler_specific.h" #include "base/memory_debug.h" @@ -733,27 +731,10 @@ int TCPClientSocketWin::SetupSocket() { // http://technet.microsoft.com/en-us/library/bb726981.aspx const BOOL kDisableNagle = TRUE; int rv = setsockopt(socket_, IPPROTO_TCP, TCP_NODELAY, - reinterpret_cast<const char*>(&kDisableNagle), - sizeof(kDisableNagle)); + reinterpret_cast<const char*>(&kDisableNagle), sizeof(kDisableNagle)); DCHECK(!rv) << "Could not disable nagle"; - // Enable TCP Keep-Alive to prevent NAT routers from timing out TCP - // connections. See http://crbug.com/27400 for details. - - struct tcp_keepalive keepalive_vals = { - 1, // TCP keep-alive on. - 45000, // Wait 45s until sending first TCP keep-alive packet. - 45000, // Wait 45s between sending TCP keep-alive packets. - }; - DWORD bytes_returned = 0xABAB; - rv = WSAIoctl(socket_, SIO_KEEPALIVE_VALS, &keepalive_vals, - sizeof(keepalive_vals), NULL, 0, - &bytes_returned, NULL, NULL); - DCHECK_EQ(0u, bytes_returned); - DCHECK(!rv) << "Could not enable TCP Keep-Alive for socket: " << socket_ - << " [error: " << WSAGetLastError() << "]."; - - // Disregard any failure in disabling nagle or enabling TCP Keep-Alive. + // Disregard any failure in disabling nagle. return 0; } |