Index: net/udp/udp_socket_win.h |
diff --git a/net/udp/udp_socket_win.h b/net/udp/udp_socket_win.h |
index bd47496ee81048ab60f783076c26d5bce17a2002..0fb2bc20b63c4fcc35560b9324c334c5ecb29ab1 100644 |
--- a/net/udp/udp_socket_win.h |
+++ b/net/udp/udp_socket_win.h |
@@ -105,7 +105,16 @@ class NET_EXPORT UDPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe) { |
const BoundNetLog& NetLog() const { return net_log_; } |
+ void AllowAddressReuse(); |
+ |
+ void AllowBroadcast(); |
+ |
private: |
+ enum SocketOptions { |
+ SOCKET_OPTION_REUSE_ADDRESS = 1 << 0, |
+ SOCKET_OPTION_BROADCAST = 1 << 1 |
+ }; |
+ |
class ReadDelegate : public base::win::ObjectWatcher::Delegate { |
public: |
explicit ReadDelegate(UDPSocketWin* socket) : socket_(socket) {} |
@@ -156,6 +165,7 @@ class NET_EXPORT UDPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe) { |
int InternalRecvFrom(IOBuffer* buf, int buf_len, IPEndPoint* address); |
int InternalSendTo(IOBuffer* buf, int buf_len, const IPEndPoint* address); |
+ int SetSocketOptions(); |
int DoBind(const IPEndPoint& address); |
int RandomBind(const IPEndPoint& address); |
@@ -164,6 +174,7 @@ class NET_EXPORT UDPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe) { |
bool ReceiveAddressToIPEndpoint(IPEndPoint* address) const; |
SOCKET socket_; |
+ int socket_options_; |
// How to do source port binding, used only when UDPSocket is part of |
// UDPClientSocket, since UDPServerSocket provides Bind. |