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

Unified Diff: base/sync_socket_win.cc

Issue 464020: Add non-blocking peek for the syncsocket... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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 | « base/sync_socket_posix.cc ('k') | ipc/sync_socket_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/sync_socket_win.cc
===================================================================
--- base/sync_socket_win.cc (revision 33599)
+++ base/sync_socket_win.cc (working copy)
@@ -141,4 +141,10 @@
return count;
}
+size_t SyncSocket::Peek() {
+ DWORD available = 0;
+ PeekNamedPipe(handle_, NULL, 0, NULL, &available, NULL);
+ return available;
+}
+
} // namespace base
« no previous file with comments | « base/sync_socket_posix.cc ('k') | ipc/sync_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698