| 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/log/net_log.h" | |
| 9 | 8 |
| 10 namespace net { | 9 namespace net { |
| 11 | 10 |
| 12 UDPClientSocket::UDPClientSocket(DatagramSocket::BindType bind_type, | 11 UDPClientSocket::UDPClientSocket(DatagramSocket::BindType bind_type, |
| 13 const RandIntCallback& rand_int_cb, | 12 const RandIntCallback& rand_int_cb, |
| 14 net::NetLog* net_log, | 13 net::NetLog* net_log, |
| 15 const net::NetLog::Source& source) | 14 const net::NetLogSource& source) |
| 16 : socket_(bind_type, rand_int_cb, net_log, source), | 15 : socket_(bind_type, rand_int_cb, net_log, source), |
| 17 network_(NetworkChangeNotifier::kInvalidNetworkHandle) {} | 16 network_(NetworkChangeNotifier::kInvalidNetworkHandle) {} |
| 18 | 17 |
| 19 UDPClientSocket::~UDPClientSocket() { | 18 UDPClientSocket::~UDPClientSocket() { |
| 20 } | 19 } |
| 21 | 20 |
| 22 int UDPClientSocket::Connect(const IPEndPoint& address) { | 21 int UDPClientSocket::Connect(const IPEndPoint& address) { |
| 23 int rv = socket_.Open(address.GetFamily()); | 22 int rv = socket_.Open(address.GetFamily()); |
| 24 if (rv != OK) | 23 if (rv != OK) |
| 25 return rv; | 24 return rv; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 return socket_.NetLog(); | 116 return socket_.NetLog(); |
| 118 } | 117 } |
| 119 | 118 |
| 120 void UDPClientSocket::UseNonBlockingIO() { | 119 void UDPClientSocket::UseNonBlockingIO() { |
| 121 #if defined(OS_WIN) | 120 #if defined(OS_WIN) |
| 122 socket_.UseNonBlockingIO(); | 121 socket_.UseNonBlockingIO(); |
| 123 #endif | 122 #endif |
| 124 } | 123 } |
| 125 | 124 |
| 126 } // namespace net | 125 } // namespace net |
| OLD | NEW |