OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_UDP_SOCKET_WIN_H_ | 5 #ifndef NET_UDP_UDP_SOCKET_WIN_H_ |
6 #define NET_UDP_UDP_SOCKET_WIN_H_ | 6 #define NET_UDP_UDP_SOCKET_WIN_H_ |
7 | 7 |
8 #include <qos2.h> | 8 #include <qos2.h> |
9 #include <winsock2.h> | 9 #include <winsock2.h> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // Returns a net error code. | 43 // Returns a net error code. |
44 int Connect(const IPEndPoint& address); | 44 int Connect(const IPEndPoint& address); |
45 | 45 |
46 // Binds the address/port for this socket to |address|. This is generally | 46 // Binds the address/port for this socket to |address|. This is generally |
47 // only used on a server. Should be called after Open(). | 47 // only used on a server. Should be called after Open(). |
48 // Returns a net error code. | 48 // Returns a net error code. |
49 int Bind(const IPEndPoint& address); | 49 int Bind(const IPEndPoint& address); |
50 | 50 |
51 // Closes the socket. | 51 // Closes the socket. |
52 // TODO(rvargas, hidehiko): Disallow re-Open() after Close(). | 52 // TODO(rvargas, hidehiko): Disallow re-Open() after Close(). |
53 void Close(); | 53 int Close(); |
54 | 54 |
55 // Copies the remote udp address into |address| and returns a net error code. | 55 // Copies the remote udp address into |address| and returns a net error code. |
56 int GetPeerAddress(IPEndPoint* address) const; | 56 int GetPeerAddress(IPEndPoint* address) const; |
57 | 57 |
58 // Copies the local udp address into |address| and returns a net error code. | 58 // Copies the local udp address into |address| and returns a net error code. |
59 // (similar to getsockname) | 59 // (similar to getsockname) |
60 int GetLocalAddress(IPEndPoint* address) const; | 60 int GetLocalAddress(IPEndPoint* address) const; |
61 | 61 |
62 // IO: | 62 // IO: |
63 // Multiple outstanding read requests are not supported. | 63 // Multiple outstanding read requests are not supported. |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 SetFlowFn set_flow_func_; | 361 SetFlowFn set_flow_func_; |
362 | 362 |
363 FRIEND_TEST_ALL_PREFIXES(UDPSocketTest, SetDSCPFake); | 363 FRIEND_TEST_ALL_PREFIXES(UDPSocketTest, SetDSCPFake); |
364 DISALLOW_COPY_AND_ASSIGN(QwaveAPI); | 364 DISALLOW_COPY_AND_ASSIGN(QwaveAPI); |
365 }; | 365 }; |
366 | 366 |
367 | 367 |
368 } // namespace net | 368 } // namespace net |
369 | 369 |
370 #endif // NET_UDP_UDP_SOCKET_WIN_H_ | 370 #endif // NET_UDP_UDP_SOCKET_WIN_H_ |
OLD | NEW |