| 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_UDP_DATAGRAM_CLIENT_SOCKET_H_ | 5 #ifndef NET_UDP_DATAGRAM_CLIENT_SOCKET_H_ |
| 6 #define NET_UDP_DATAGRAM_CLIENT_SOCKET_H_ | 6 #define NET_UDP_DATAGRAM_CLIENT_SOCKET_H_ |
| 7 | 7 |
| 8 #include "net/base/network_change_notifier.h" | 8 #include "net/base/network_change_notifier.h" |
| 9 #include "net/socket/socket.h" | 9 #include "net/socket/socket.h" |
| 10 #include "net/udp/datagram_socket.h" | 10 #include "net/udp/datagram_socket.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // Returns a net error code. | 25 // Returns a net error code. |
| 26 virtual int BindToNetwork(NetworkChangeNotifier::NetworkHandle network) = 0; | 26 virtual int BindToNetwork(NetworkChangeNotifier::NetworkHandle network) = 0; |
| 27 | 27 |
| 28 // Same as BindToNetwork, except that the current default network is used. | 28 // Same as BindToNetwork, except that the current default network is used. |
| 29 // Returns a net error code. | 29 // Returns a net error code. |
| 30 virtual int BindToDefaultNetwork() = 0; | 30 virtual int BindToDefaultNetwork() = 0; |
| 31 | 31 |
| 32 // Returns the network that either BindToNetwork() or BindToDefaultNetwork() | 32 // Returns the network that either BindToNetwork() or BindToDefaultNetwork() |
| 33 // bound this socket to. Returns NetworkChangeNotifier::kInvalidNetworkHandle | 33 // bound this socket to. Returns NetworkChangeNotifier::kInvalidNetworkHandle |
| 34 // if not explicitly bound via BindToNetwork() or BindToDefaultNetwork(). | 34 // if not explicitly bound via BindToNetwork() or BindToDefaultNetwork(). |
| 35 virtual NetworkChangeNotifier::NetworkHandle GetBoundNetwork() = 0; | 35 virtual NetworkChangeNotifier::NetworkHandle GetBoundNetwork() const = 0; |
| 36 | 36 |
| 37 // Initialize this socket as a client socket to server at |address|. | 37 // Initialize this socket as a client socket to server at |address|. |
| 38 // Returns a network error code. | 38 // Returns a network error code. |
| 39 virtual int Connect(const IPEndPoint& address) = 0; | 39 virtual int Connect(const IPEndPoint& address) = 0; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 } // namespace net | 42 } // namespace net |
| 43 | 43 |
| 44 #endif // NET_UDP_DATAGRAM_CLIENT_SOCKET_H_ | 44 #endif // NET_UDP_DATAGRAM_CLIENT_SOCKET_H_ |
| OLD | NEW |