summaryrefslogtreecommitdiffstats
path: root/net/base/client_socket.h
diff options
context:
space:
mode:
authorwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-05 23:15:36 +0000
committerwtc@google.com <wtc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-05 23:15:36 +0000
commit836dff30efbff95f2090a024da25debe4edd2f83 (patch)
tree9b07faaabad76f19a30769a9bdcd1ee5e3e47b2a /net/base/client_socket.h
parenta218f15b205006e999a0dcabd7ebbe631def4e3b (diff)
downloadchromium_src-836dff30efbff95f2090a024da25debe4edd2f83.zip
chromium_src-836dff30efbff95f2090a024da25debe4edd2f83.tar.gz
chromium_src-836dff30efbff95f2090a024da25debe4edd2f83.tar.bz2
Make some changes from my code review. Two significant
changes are: 1. Call WSAEventSelect before connect to fix a race condition. 2. Call WSAResetEvent before WSARecv and WSASend because the event is manual-reset and WSAGetOverlappedResult doesn't reset the event for us. R=darin git-svn-id: svn://svn.chromium.org/chrome/trunk/src@406 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/client_socket.h')
-rw-r--r--net/base/client_socket.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/base/client_socket.h b/net/base/client_socket.h
index 8661adc..1f61c0f 100644
--- a/net/base/client_socket.h
+++ b/net/base/client_socket.h
@@ -38,9 +38,9 @@ class ClientSocket : public Socket {
public:
// Called to establish a connection. Returns OK if the connection could be
// established synchronously. Otherwise, ERR_IO_PENDING is returned and the
- // given callback will be notified asynchronously when the connection is
- // established or when an error occurs. The result is some other error code
- // if the connection could not be established.
+ // given callback will run asynchronously when the connection is established
+ // or when an error occurs. The result is some other error code if the
+ // connection could not be established.
//
// The socket's Read and Write methods may not be called until Connect
// succeeds.
@@ -48,7 +48,7 @@ class ClientSocket : public Socket {
// It is valid to call Connect on an already connected socket, in which case
// OK is simply returned.
//
- // Connect may also be called again after a call to the Close method.
+ // Connect may also be called again after a call to the Disconnect method.
//
virtual int Connect(CompletionCallback* callback) = 0;
@@ -62,7 +62,8 @@ class ClientSocket : public Socket {
// Connect again to establish a new connection.
virtual void Disconnect() = 0;
- // Called to test if the socket is connected.
+ // Called to test if the connection is still alive. Returns false if a
+ // connection wasn't established or the connection is dead.
virtual bool IsConnected() const = 0;
};