OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/sync_socket.h" | 5 #include "base/sync_socket.h" |
6 | 6 |
7 #include <errno.h> | 7 #include <errno.h> |
8 #include <limits.h> | 8 #include <limits.h> |
9 #include <stdio.h> | 9 #include <stdio.h> |
10 #include <sys/types.h> | 10 #include <sys/types.h> |
(...skipping 27 matching lines...) Expand all Loading... | |
38 | 38 |
39 size_t SyncSocket::Send(const void* buffer, size_t length) { | 39 size_t SyncSocket::Send(const void* buffer, size_t length) { |
40 // Not implemented since it's not needed by any client code yet. | 40 // Not implemented since it's not needed by any client code yet. |
41 return -1; | 41 return -1; |
42 } | 42 } |
43 | 43 |
44 size_t SyncSocket::Receive(void* buffer, size_t length) { | 44 size_t SyncSocket::Receive(void* buffer, size_t length) { |
45 return read(handle_, buffer, length); | 45 return read(handle_, buffer, length); |
46 } | 46 } |
47 | 47 |
48 size_t SyncSocket::ReceiveWithTimeout(void* buffer, size_t length, TimeDelta) { | |
49 return -1; | |
jar (doing other things)
2013/10/14 15:31:07
Shouldn't this be return 0?
DaleCurtis
2013/10/14 19:25:13
I just copied the pattern, but probably all of the
| |
50 } | |
51 | |
48 size_t SyncSocket::Peek() { | 52 size_t SyncSocket::Peek() { |
49 return -1; | 53 return -1; |
50 } | 54 } |
51 | 55 |
52 CancelableSyncSocket::CancelableSyncSocket() { | 56 CancelableSyncSocket::CancelableSyncSocket() { |
53 } | 57 } |
54 | 58 |
55 CancelableSyncSocket::CancelableSyncSocket(Handle handle) | 59 CancelableSyncSocket::CancelableSyncSocket(Handle handle) |
56 : SyncSocket(handle) { | 60 : SyncSocket(handle) { |
57 } | 61 } |
58 | 62 |
59 size_t CancelableSyncSocket::Send(const void* buffer, size_t length) { | 63 size_t CancelableSyncSocket::Send(const void* buffer, size_t length) { |
60 return -1; | 64 return -1; |
61 } | 65 } |
62 | 66 |
63 bool CancelableSyncSocket::Shutdown() { | 67 bool CancelableSyncSocket::Shutdown() { |
64 return false; | 68 return false; |
65 } | 69 } |
66 | 70 |
67 // static | 71 // static |
68 bool CancelableSyncSocket::CreatePair(CancelableSyncSocket* socket_a, | 72 bool CancelableSyncSocket::CreatePair(CancelableSyncSocket* socket_a, |
69 CancelableSyncSocket* socket_b) { | 73 CancelableSyncSocket* socket_b) { |
70 return SyncSocket::CreatePair(socket_a, socket_b); | 74 return SyncSocket::CreatePair(socket_a, socket_b); |
71 } | 75 } |
72 | 76 |
73 } // namespace base | 77 } // namespace base |
OLD | NEW |