| 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 #ifndef NET_SOCKET_UDP_CLIENT_SOCKET_H_ | 5 #ifndef NET_SOCKET_UDP_CLIENT_SOCKET_H_ |
| 6 #define NET_SOCKET_UDP_CLIENT_SOCKET_H_ | 6 #define NET_SOCKET_UDP_CLIENT_SOCKET_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "net/base/rand_callback.h" | 11 #include "net/base/rand_callback.h" |
| 12 #include "net/log/net_log.h" | |
| 13 #include "net/udp/datagram_client_socket.h" | 12 #include "net/udp/datagram_client_socket.h" |
| 14 #include "net/udp/udp_socket.h" | 13 #include "net/udp/udp_socket.h" |
| 15 | 14 |
| 16 namespace net { | 15 namespace net { |
| 17 | 16 |
| 18 class NetLogWithSource; | 17 class NetLog; |
| 18 struct NetLogSource; |
| 19 | 19 |
| 20 // A client socket that uses UDP as the transport layer. | 20 // A client socket that uses UDP as the transport layer. |
| 21 class NET_EXPORT_PRIVATE UDPClientSocket : public DatagramClientSocket { | 21 class NET_EXPORT_PRIVATE UDPClientSocket : public DatagramClientSocket { |
| 22 public: | 22 public: |
| 23 UDPClientSocket(DatagramSocket::BindType bind_type, | 23 UDPClientSocket(DatagramSocket::BindType bind_type, |
| 24 const RandIntCallback& rand_int_cb, | 24 const RandIntCallback& rand_int_cb, |
| 25 net::NetLog* net_log, | 25 net::NetLog* net_log, |
| 26 const net::NetLog::Source& source); | 26 const net::NetLogSource& source); |
| 27 ~UDPClientSocket() override; | 27 ~UDPClientSocket() override; |
| 28 | 28 |
| 29 // DatagramClientSocket implementation. | 29 // DatagramClientSocket implementation. |
| 30 int Connect(const IPEndPoint& address) override; | 30 int Connect(const IPEndPoint& address) override; |
| 31 int ConnectUsingNetwork(NetworkChangeNotifier::NetworkHandle network, | 31 int ConnectUsingNetwork(NetworkChangeNotifier::NetworkHandle network, |
| 32 const IPEndPoint& address) override; | 32 const IPEndPoint& address) override; |
| 33 int ConnectUsingDefaultNetwork(const IPEndPoint& address) override; | 33 int ConnectUsingDefaultNetwork(const IPEndPoint& address) override; |
| 34 NetworkChangeNotifier::NetworkHandle GetBoundNetwork() const override; | 34 NetworkChangeNotifier::NetworkHandle GetBoundNetwork() const override; |
| 35 int Read(IOBuffer* buf, | 35 int Read(IOBuffer* buf, |
| 36 int buf_len, | 36 int buf_len, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 51 // before other calls. | 51 // before other calls. |
| 52 private: | 52 private: |
| 53 UDPSocket socket_; | 53 UDPSocket socket_; |
| 54 NetworkChangeNotifier::NetworkHandle network_; | 54 NetworkChangeNotifier::NetworkHandle network_; |
| 55 DISALLOW_COPY_AND_ASSIGN(UDPClientSocket); | 55 DISALLOW_COPY_AND_ASSIGN(UDPClientSocket); |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 } // namespace net | 58 } // namespace net |
| 59 | 59 |
| 60 #endif // NET_SOCKET_UDP_CLIENT_SOCKET_H_ | 60 #endif // NET_SOCKET_UDP_CLIENT_SOCKET_H_ |
| OLD | NEW |