commit | d8b65915b2181a863611254c3cefb966103386f3 | [log] [tgz] |
---|---|---|
author | [email protected] <[email protected]@0039d316-1c4b-4281-b951-d872f2087c98> | Fri Dec 04 22:53:22 2009 |
committer | [email protected] <[email protected]@0039d316-1c4b-4281-b951-d872f2087c98> | Fri Dec 04 22:53:22 2009 |
tree | 407ca5888d6e468854b78c701a4dac0fe811a6a0 | |
parent | 0baf8d2d5e43cbbc99700e0acf5eb0676c209972 [diff] [blame] |
Add non-blocking peek for the syncsocket - Windows only BUG=none TEST=unit test included Review URL: http://codereview.chromium.org/464020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33876 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/base/sync_socket_win.cc b/base/sync_socket_win.cc index b591bb0..4e3c35f 100644 --- a/base/sync_socket_win.cc +++ b/base/sync_socket_win.cc
@@ -141,4 +141,10 @@ return count; } +size_t SyncSocket::Peek() { + DWORD available = 0; + PeekNamedPipe(handle_, NULL, 0, NULL, &available, NULL); + return available; +} + } // namespace base