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

Unified Diff: net/socket/tcp_socket_win.h

Issue 2690943004: Add ReadIfReady() for tcp_socket_win (Closed)
Patch Set: rebased Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | net/socket/tcp_socket_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/tcp_socket_win.h
diff --git a/net/socket/tcp_socket_win.h b/net/socket/tcp_socket_win.h
index 3dd0ee98ea49899cf3687191be564174f98fa131..1cefdca0a2965fe4cab7fa3c7a87be03210c021a 100644
--- a/net/socket/tcp_socket_win.h
+++ b/net/socket/tcp_socket_win.h
@@ -130,7 +130,7 @@ class NET_EXPORT TCPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe),
void LogConnectBegin(const AddressList& addresses);
void LogConnectEnd(int net_error);
- int DoRead(IOBuffer* buf, int buf_len, const CompletionCallback& callback);
+ void RetryRead(int rv);
void DidCompleteConnect();
void DidCompleteWrite();
void DidSignalRead();
@@ -160,6 +160,11 @@ class NET_EXPORT TCPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe),
// External callback; called when connect or read is complete.
CompletionCallback read_callback_;
+ // Non-null if a ReadIfReady() is to be completed asynchronously. This is an
+ // external callback if user used ReadIfReady() instead of Read(), but a
+ // wrapped callback on top of RetryRead() if Read() is used.
+ CompletionCallback read_if_ready_callback_;
+
// External callback; called when write is complete.
CompletionCallback write_callback_;
« no previous file with comments | « net/socket/ssl_client_socket_unittest.cc ('k') | net/socket/tcp_socket_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698