diff options
author | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-19 23:27:33 +0000 |
---|---|---|
committer | wtc@chromium.org <wtc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-19 23:27:33 +0000 |
commit | b2197853ee021e8b6d1c4f3c46e475da372b6980 (patch) | |
tree | 3429dcfc22d7f3ec683bbe2c1923b208d78adb26 /net/base/client_socket.h | |
parent | 814c99861aa1116c588a63b20dd1b7a4f9a974e0 (diff) | |
download | chromium_src-b2197853ee021e8b6d1c4f3c46e475da372b6980.zip chromium_src-b2197853ee021e8b6d1c4f3c46e475da372b6980.tar.gz chromium_src-b2197853ee021e8b6d1c4f3c46e475da372b6980.tar.bz2 |
If an idle socket has received data unexpectedly, we can't
reuse it.
Add the IsConnectedAndIdle method, which returns true if the
connection is still alive and idle (hasn't received any data
unexpectedly).
R=eroman
BUG=4606
Review URL: http://codereview.chromium.org/21501
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10060 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/client_socket.h')
-rw-r--r-- | net/base/client_socket.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/base/client_socket.h b/net/base/client_socket.h index b96f07b..f61c7f5 100644 --- a/net/base/client_socket.h +++ b/net/base/client_socket.h @@ -47,6 +47,11 @@ class ClientSocket : public Socket { // connection wasn't established or the connection is dead. virtual bool IsConnected() const = 0; + // Called to test if the connection is still alive and idle. Returns false + // if a connection wasn't established, the connection is dead, or some data + // have been received. + virtual bool IsConnectedAndIdle() const = 0; + #if defined(OS_LINUX) // Identical to posix system call getpeername(). // Needed by ssl_client_socket_nss. |