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_UDP_DATAGRAM_SERVER_SOCKET_H_ | 5 #ifndef NET_UDP_DATAGRAM_SERVER_SOCKET_H_ |
6 #define NET_UDP_DATAGRAM_SERVER_SOCKET_H_ | 6 #define NET_UDP_DATAGRAM_SERVER_SOCKET_H_ |
7 | 7 |
8 #include "net/base/completion_callback.h" | 8 #include "net/base/completion_callback.h" |
9 #include "net/udp/datagram_socket.h" | 9 #include "net/udp/datagram_socket.h" |
10 | 10 |
11 namespace net { | 11 namespace net { |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 virtual int SendTo(IOBuffer* buf, | 52 virtual int SendTo(IOBuffer* buf, |
53 int buf_len, | 53 int buf_len, |
54 const IPEndPoint& address, | 54 const IPEndPoint& address, |
55 const CompletionCallback& callback) = 0; | 55 const CompletionCallback& callback) = 0; |
56 | 56 |
57 // Set the receive buffer size (in bytes) for the socket. | 57 // Set the receive buffer size (in bytes) for the socket. |
58 virtual bool SetReceiveBufferSize(int32 size) = 0; | 58 virtual bool SetReceiveBufferSize(int32 size) = 0; |
59 | 59 |
60 // Set the send buffer size (in bytes) for the socket. | 60 // Set the send buffer size (in bytes) for the socket. |
61 virtual bool SetSendBufferSize(int32 size) = 0; | 61 virtual bool SetSendBufferSize(int32 size) = 0; |
| 62 |
| 63 // Allow the socket to share the local address to which socket will |
| 64 // be bound with other processes. Should be called before Listen(). |
| 65 virtual void AllowAddressReuse() = 0; |
| 66 |
| 67 // Allow sending and receiving packets sent to and from broadcast |
| 68 // addresses. Should be called before Listen(). |
| 69 virtual void AllowBroadcast() = 0; |
62 }; | 70 }; |
63 | 71 |
64 } // namespace net | 72 } // namespace net |
65 | 73 |
66 #endif // NET_UDP_DATAGRAM_SERVER_SOCKET_H_ | 74 #endif // NET_UDP_DATAGRAM_SERVER_SOCKET_H_ |
OLD | NEW |