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

Unified Diff: net/udp/udp_socket_libevent.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_libevent.h
diff --git a/net/udp/udp_socket_libevent.h b/net/udp/udp_socket_libevent.h
index 2101abb8c89349f5812013e8f9380b96a5981d01..842dce403e773e25ccef64b21138577e8d8bdce3 100644
--- a/net/udp/udp_socket_libevent.h
+++ b/net/udp/udp_socket_libevent.h
@@ -104,6 +104,8 @@ class NET_EXPORT UDPSocketLibevent : public base::NonThreadSafe {
const BoundNetLog& NetLog() const { return net_log_; }
+ void AllowBroadcast();
+
private:
static const int kInvalidSocket = -1;
@@ -173,10 +175,12 @@ class NET_EXPORT UDPSocketLibevent : 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);
int 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