| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "net/udp/udp_client_socket.h" | 5 #include "net/udp/udp_client_socket.h" |
| 6 | 6 |
| 7 #include "net/base/net_errors.h" | 7 #include "net/base/net_errors.h" |
| 8 #include "net/base/net_log.h" | 8 #include "net/base/net_log.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 const CompletionCallback& callback) { | 31 const CompletionCallback& callback) { |
| 32 return socket_.Read(buf, buf_len, callback); | 32 return socket_.Read(buf, buf_len, callback); |
| 33 } | 33 } |
| 34 | 34 |
| 35 int UDPClientSocket::Write(IOBuffer* buf, | 35 int UDPClientSocket::Write(IOBuffer* buf, |
| 36 int buf_len, | 36 int buf_len, |
| 37 const CompletionCallback& callback) { | 37 const CompletionCallback& callback) { |
| 38 return socket_.Write(buf, buf_len, callback); | 38 return socket_.Write(buf, buf_len, callback); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void UDPClientSocket::Close() { | 41 int UDPClientSocket::Close() { |
| 42 socket_.Close(); | 42 socket_.Close(); |
| 43 return OK; |
| 43 } | 44 } |
| 44 | 45 |
| 45 int UDPClientSocket::GetPeerAddress(IPEndPoint* address) const { | 46 int UDPClientSocket::GetPeerAddress(IPEndPoint* address) const { |
| 46 return socket_.GetPeerAddress(address); | 47 return socket_.GetPeerAddress(address); |
| 47 } | 48 } |
| 48 | 49 |
| 49 int UDPClientSocket::GetLocalAddress(IPEndPoint* address) const { | 50 int UDPClientSocket::GetLocalAddress(IPEndPoint* address) const { |
| 50 return socket_.GetLocalAddress(address); | 51 return socket_.GetLocalAddress(address); |
| 51 } | 52 } |
| 52 | 53 |
| 53 int UDPClientSocket::SetReceiveBufferSize(int32 size) { | 54 int UDPClientSocket::SetReceiveBufferSize(int32 size) { |
| 54 return socket_.SetReceiveBufferSize(size); | 55 return socket_.SetReceiveBufferSize(size); |
| 55 } | 56 } |
| 56 | 57 |
| 57 int UDPClientSocket::SetSendBufferSize(int32 size) { | 58 int UDPClientSocket::SetSendBufferSize(int32 size) { |
| 58 return socket_.SetSendBufferSize(size); | 59 return socket_.SetSendBufferSize(size); |
| 59 } | 60 } |
| 60 | 61 |
| 61 const BoundNetLog& UDPClientSocket::NetLog() const { | 62 const BoundNetLog& UDPClientSocket::NetLog() const { |
| 62 return socket_.NetLog(); | 63 return socket_.NetLog(); |
| 63 } | 64 } |
| 64 | 65 |
| 65 #if defined(OS_WIN) | 66 #if defined(OS_WIN) |
| 66 void UDPClientSocket::UseNonBlockingIO() { | 67 void UDPClientSocket::UseNonBlockingIO() { |
| 67 socket_.UseNonBlockingIO(); | 68 socket_.UseNonBlockingIO(); |
| 68 } | 69 } |
| 69 #endif | 70 #endif |
| 70 | 71 |
| 71 } // namespace net | 72 } // namespace net |
| OLD | NEW |