OLD | NEW |
1 // Copyright (c) 2011 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_SOCKET_UDP_SERVER_SOCKET_H_ | 5 #ifndef NET_SOCKET_UDP_SERVER_SOCKET_H_ |
6 #define NET_SOCKET_UDP_SERVER_SOCKET_H_ | 6 #define NET_SOCKET_UDP_SERVER_SOCKET_H_ |
7 | 7 |
8 #include "net/base/completion_callback.h" | 8 #include "net/base/completion_callback.h" |
9 #include "net/udp/datagram_server_socket.h" | 9 #include "net/udp/datagram_server_socket.h" |
10 #include "net/udp/udp_socket.h" | 10 #include "net/udp/udp_socket.h" |
11 | 11 |
(...skipping 18 matching lines...) Expand all Loading... |
30 virtual int SendTo(IOBuffer* buf, | 30 virtual int SendTo(IOBuffer* buf, |
31 int buf_len, | 31 int buf_len, |
32 const IPEndPoint& address, | 32 const IPEndPoint& address, |
33 const CompletionCallback& callback) OVERRIDE; | 33 const CompletionCallback& callback) OVERRIDE; |
34 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; | 34 virtual bool SetReceiveBufferSize(int32 size) OVERRIDE; |
35 virtual bool SetSendBufferSize(int32 size) OVERRIDE; | 35 virtual bool SetSendBufferSize(int32 size) OVERRIDE; |
36 virtual void Close() OVERRIDE; | 36 virtual void Close() OVERRIDE; |
37 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; | 37 virtual int GetPeerAddress(IPEndPoint* address) const OVERRIDE; |
38 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; | 38 virtual int GetLocalAddress(IPEndPoint* address) const OVERRIDE; |
39 virtual const BoundNetLog& NetLog() const OVERRIDE; | 39 virtual const BoundNetLog& NetLog() const OVERRIDE; |
| 40 virtual void AllowAddressReuse() OVERRIDE; |
| 41 virtual void AllowBroadcast() OVERRIDE; |
40 | 42 |
41 private: | 43 private: |
42 UDPSocket socket_; | 44 UDPSocket socket_; |
43 DISALLOW_COPY_AND_ASSIGN(UDPServerSocket); | 45 DISALLOW_COPY_AND_ASSIGN(UDPServerSocket); |
44 }; | 46 }; |
45 | 47 |
46 } // namespace net | 48 } // namespace net |
47 | 49 |
48 #endif // NET_SOCKET_UDP_SERVER_SOCKET_H_ | 50 #endif // NET_SOCKET_UDP_SERVER_SOCKET_H_ |
OLD | NEW |