Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Unified Diff: net/udp/udp_socket_win.h

Issue 10739002: Added broadcasting feature to UDP server sockets. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added MacOS specific code. Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/udp/udp_socket_win.h
diff --git a/net/udp/udp_socket_win.h b/net/udp/udp_socket_win.h
index e55b1f09366c7771b312aeb4882bfc5c46c608be..106e6b44854eaa91baa3afe3b5cd277b1e124cf6 100644
--- a/net/udp/udp_socket_win.h
+++ b/net/udp/udp_socket_win.h
@@ -106,6 +106,8 @@ class NET_EXPORT UDPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe) {
const BoundNetLog& NetLog() const { return net_log_; }
+ void AllowBroadcast();
+
private:
class ReadDelegate : public base::win::ObjectWatcher::Delegate {
public:
@@ -157,6 +159,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 DoBroadcast();
int DoBind(const IPEndPoint& address);
int RandomBind(const IPEndPoint& address);
@@ -165,6 +168,7 @@ class NET_EXPORT UDPSocketWin : NON_EXPORTED_BASE(public base::NonThreadSafe) {
bool ReceiveAddressToIPEndpoint(IPEndPoint* address) const;
SOCKET socket_;
+ bool allow_broadcast_;
// How to do source port binding, used only when UDPSocket is part of
// UDPClientSocket, since UDPServerSocket provides Bind.

Powered by Google App Engine
This is Rietveld 408576698