Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(486)

Issue 6162005: Set TCP keep alive on Linux and Mac. (Closed)

Created:
9 years, 11 months ago by willchan no longer on Chromium
Modified:
8 years, 7 months ago
Reviewers:
cbentzel, wtc, eroman, agl
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

Set TCP keep alive on Linux and Mac. On Linux, also set the timeouts. BUG=27400 TEST=Start wireshark and capture packets. Start chrome. Open www.facebook.com. Let it sit idle for awhile. Wait for TCP keep alive packets to be sent out after 45 seconds on Linux. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71482

Patch Set 1 #

Total comments: 2

Patch Set 2 : Eliminate redundancy. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -0 lines) Patch
M net/socket/tcp_client_socket_libevent.cc View 1 2 chunks +24 lines, -0 lines 1 comment Download

Messages

Total messages: 8 (0 generated)
willchan no longer on Chromium
eroman: General review agl: Please review my Linux specific (non-portable) changes.
9 years, 11 months ago (2011-01-14 16:33:35 UTC) #1
agl
LGTM http://codereview.chromium.org/6162005/diff/1/net/socket/tcp_client_socket_libevent.cc File net/socket/tcp_client_socket_libevent.cc (right): http://codereview.chromium.org/6162005/diff/1/net/socket/tcp_client_socket_libevent.cc#newcode64 net/socket/tcp_client_socket_libevent.cc:64: optval = 45; seems redundant, although you could ...
9 years, 11 months ago (2011-01-14 16:37:48 UTC) #2
willchan no longer on Chromium
http://codereview.chromium.org/6162005/diff/1/net/socket/tcp_client_socket_libevent.cc File net/socket/tcp_client_socket_libevent.cc (right): http://codereview.chromium.org/6162005/diff/1/net/socket/tcp_client_socket_libevent.cc#newcode64 net/socket/tcp_client_socket_libevent.cc:64: optval = 45; oops, unintentional copy/paste error. On 2011/01/14 ...
9 years, 11 months ago (2011-01-14 16:40:55 UTC) #3
cbentzel
driveby question [the code looks fine] Is this mainly being used to early-detect dead peers? ...
9 years, 11 months ago (2011-01-14 16:42:41 UTC) #4
willchan no longer on Chromium
Actually, it's because NAT routers (or whatever other intermediaries there are) are whacking our idle ...
9 years, 11 months ago (2011-01-14 16:52:44 UTC) #5
wtc
http://codereview.chromium.org/6162005/diff/5001/net/socket/tcp_client_socket_libevent.cc File net/socket/tcp_client_socket_libevent.cc (right): http://codereview.chromium.org/6162005/diff/5001/net/socket/tcp_client_socket_libevent.cc#newcode519 net/socket/tcp_client_socket_libevent.cc:519: SetTCPKeepAlive(socket_); Please add a comment to explain why we ...
9 years, 11 months ago (2011-01-18 20:22:48 UTC) #6
jeremya
This is a rather belated message, but I'm doing some unrelated investigations into keepalives on ...
8 years, 7 months ago (2012-04-30 05:27:32 UTC) #7
wtc
8 years, 7 months ago (2012-04-30 19:45:33 UTC) #8
jeremya:  Thank you for your comment.  Could you give it a try and
see if it works?

I have two related questions:

1. Do you know what is the default value of TCP_KEEPALIVE on Mac OS X?

2. In the system header files <netinet/tcp_var.h>, I also found
TCPCTL_KEEPIDLE and TCPCTL_KEEPINTVL, which look like the Linux
TCP_KEEPIDLE and TCP_KEEPINTVL options.  Should we use those
TCPCTL_KEEPxxx options instead?

Powered by Google App Engine
This is Rietveld 408576698