| Index: base/sync_socket_win.cc
|
| diff --git a/base/sync_socket_win.cc b/base/sync_socket_win.cc
|
| index 99a6afea3ec2fdde77f7ac829cbf102fa6998098..0475c9408e6af575731c6e0948c32dbd1b7e5947 100644
|
| --- a/base/sync_socket_win.cc
|
| +++ b/base/sync_socket_win.cc
|
| @@ -138,7 +138,7 @@ size_t CancelableFileOperation(Function operation, HANDLE file,
|
| if (wait_result == (WAIT_OBJECT_0 + 0)) {
|
| GetOverlappedResult(file, &ol, &len, TRUE);
|
| } else if (wait_result == (WAIT_OBJECT_0 + 1)) {
|
| - VLOG(1) << "Shutdown was signaled. Closing socket.";
|
| + DVLOG(1) << "Shutdown was signaled. Closing socket.";
|
| CancelIo(file);
|
| socket->Close();
|
| count = 0;
|
| @@ -146,9 +146,8 @@ size_t CancelableFileOperation(Function operation, HANDLE file,
|
| } else {
|
| // Timeout happened.
|
| DCHECK_EQ(WAIT_TIMEOUT, wait_result);
|
| - if (!CancelIo(file)){
|
| + if (!CancelIo(file))
|
| DLOG(WARNING) << "CancelIo() failed";
|
| - }
|
| break;
|
| }
|
| } else {
|
| @@ -207,6 +206,13 @@ size_t SyncSocket::Send(const void* buffer, size_t length) {
|
| return count;
|
| }
|
|
|
| +size_t SyncSocket::ReceiveWithTimeout(void* buffer,
|
| + size_t length,
|
| + TimeDelta timeout) {
|
| + NOTIMPLEMENTED();
|
| + return 0;
|
| +}
|
| +
|
| size_t SyncSocket::Receive(void* buffer, size_t length) {
|
| DCHECK_LE(length, kMaxMessageLength);
|
| size_t count = 0;
|
| @@ -258,9 +264,17 @@ size_t CancelableSyncSocket::Send(const void* buffer, size_t length) {
|
| }
|
|
|
| size_t CancelableSyncSocket::Receive(void* buffer, size_t length) {
|
| - return CancelableFileOperation(&ReadFile, handle_,
|
| - reinterpret_cast<char*>(buffer), length, &file_operation_,
|
| - &shutdown_event_, this, INFINITE);
|
| + return CancelableFileOperation(
|
| + &ReadFile, handle_, reinterpret_cast<char*>(buffer), length,
|
| + &file_operation_, &shutdown_event_, this, INFINITE);
|
| +}
|
| +
|
| +size_t CancelableSyncSocket::ReceiveWithTimeout(void* buffer,
|
| + size_t length,
|
| + base::TimeDelta timeout) {
|
| + return CancelableFileOperation(
|
| + &ReadFile, handle_, reinterpret_cast<char*>(buffer), length,
|
| + &file_operation_, &shutdown_event_, this, timeout.InMilliseconds());
|
| }
|
|
|
| // static
|
|
|