Index: net/socket/tcp_client_socket_libevent.h |
diff --git a/net/socket/tcp_client_socket_libevent.h b/net/socket/tcp_client_socket_libevent.h |
index 2a6b041c6fd2ac652e944293c6da8e71b6c8e6ec..90c3fbf35b560791287fea7eacebd174c77e4973 100644 |
--- a/net/socket/tcp_client_socket_libevent.h |
+++ b/net/socket/tcp_client_socket_libevent.h |
@@ -42,8 +42,9 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket, |
// Binds the socket to a local IP address and port. |
int Bind(const IPEndPoint& address); |
- // StreamSocket methods: |
+ // StreamSocket implementation. |
virtual int Connect(OldCompletionCallback* callback) OVERRIDE; |
+ virtual int Connect(const CompletionCallback& callback) OVERRIDE; |
virtual void Disconnect() OVERRIDE; |
virtual bool IsConnected() const OVERRIDE; |
virtual bool IsConnectedAndIdle() const OVERRIDE; |
@@ -57,7 +58,7 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket, |
virtual int64 NumBytesRead() const OVERRIDE; |
virtual base::TimeDelta GetConnectTimeMicros() const OVERRIDE; |
- // Socket methods: |
+ // Socket implementation. |
// Multiple outstanding requests are not supported. |
// Full duplex mode (reading and writing at the same time) is supported |
virtual int Read(IOBuffer* buf, |
@@ -107,7 +108,7 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket, |
virtual void OnFileCanWriteWithoutBlocking(int /* fd */) OVERRIDE { |
if (socket_->waiting_connect()) { |
socket_->DidCompleteConnect(); |
- } else if (socket_->write_callback_) { |
+ } else if (socket_->old_write_callback_) { |
csilv
2011/12/06 21:03:18
seems like we should also check write_callback?
James Hawkins
2011/12/06 22:19:30
Done.
|
socket_->DidCompleteWrite(); |
} |
} |
@@ -179,7 +180,8 @@ class NET_EXPORT_PRIVATE TCPClientSocketLibevent : public StreamSocket, |
OldCompletionCallback* read_callback_; |
// External callback; called when write is complete. |
- OldCompletionCallback* write_callback_; |
+ OldCompletionCallback* old_write_callback_; |
+ CompletionCallback write_callback_; |
// The next state for the Connect() state machine. |
ConnectState next_connect_state_; |