| 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_log.h" | 7 #include "net/base/net_log.h" |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 | 10 |
| 11 UDPClientSocket::UDPClientSocket(DatagramSocket::BindType bind_type, | 11 UDPClientSocket::UDPClientSocket(DatagramSocket::BindType bind_type, |
| 12 const RandIntCallback& rand_int_cb, | 12 const RandIntCallback& rand_int_cb, |
| 13 net::NetLog* net_log, | 13 net::NetLog* net_log, |
| 14 const net::NetLog::Source& source) | 14 const net::NetLog::Source& source) |
| 15 : socket_(bind_type, rand_int_cb, net_log, source) { | 15 : socket_(bind_type, rand_int_cb, net_log, source) { |
| 16 } | 16 } |
| 17 | 17 |
| 18 UDPClientSocket::~UDPClientSocket() { | 18 UDPClientSocket::~UDPClientSocket() { |
| 19 } | 19 } |
| 20 | 20 |
| 21 int UDPClientSocket::Connect(const IPEndPoint& address) { | 21 int UDPClientSocket::Connect(const IPEndPoint& address) { |
| 22 return socket_.Connect(address); | 22 return socket_.Connect(address); |
| 23 } | 23 } |
| 24 | 24 |
| 25 int UDPClientSocket::Read(IOBuffer* buf, | 25 int UDPClientSocket::Read(IOBuffer* buf, |
| 26 int buf_len, | 26 int buf_len, |
| 27 OldCompletionCallback* callback) { | 27 OldCompletionCallback* callback) { |
| 28 return socket_.Read(buf, buf_len, callback); | 28 return socket_.Read(buf, buf_len, callback); |
| 29 } | 29 } |
| 30 int UDPClientSocket::Read(IOBuffer* buf, |
| 31 int buf_len, |
| 32 const CompletionCallback& callback) { |
| 33 return socket_.Read(buf, buf_len, callback); |
| 34 } |
| 30 | 35 |
| 31 int UDPClientSocket::Write(IOBuffer* buf, | 36 int UDPClientSocket::Write(IOBuffer* buf, |
| 32 int buf_len, | 37 int buf_len, |
| 33 OldCompletionCallback* callback) { | 38 OldCompletionCallback* callback) { |
| 34 return socket_.Write(buf, buf_len, callback); | 39 return socket_.Write(buf, buf_len, callback); |
| 35 } | 40 } |
| 36 | 41 |
| 37 void UDPClientSocket::Close() { | 42 void UDPClientSocket::Close() { |
| 38 socket_.Close(); | 43 socket_.Close(); |
| 39 } | 44 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 52 | 57 |
| 53 bool UDPClientSocket::SetSendBufferSize(int32 size) { | 58 bool UDPClientSocket::SetSendBufferSize(int32 size) { |
| 54 return socket_.SetSendBufferSize(size); | 59 return socket_.SetSendBufferSize(size); |
| 55 } | 60 } |
| 56 | 61 |
| 57 const BoundNetLog& UDPClientSocket::NetLog() const { | 62 const BoundNetLog& UDPClientSocket::NetLog() const { |
| 58 return socket_.NetLog(); | 63 return socket_.NetLog(); |
| 59 } | 64 } |
| 60 | 65 |
| 61 } // namespace net | 66 } // namespace net |
| OLD | NEW |