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

Unified Diff: extensions/browser/api/socket/udp_socket.h

Issue 2378763003: Add ability to reuse address in chrome.sockets.udp
Patch Set: Respond to code reviews, clean up tests Created 4 years, 3 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
« no previous file with comments | « no previous file | extensions/browser/api/socket/udp_socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/socket/udp_socket.h
diff --git a/extensions/browser/api/socket/udp_socket.h b/extensions/browser/api/socket/udp_socket.h
index 17a4117441c8eb98b11531b5a85a59f1a550ebc0..9ab54c385df923d3f5e1254b662bf549f9222522 100644
--- a/extensions/browser/api/socket/udp_socket.h
+++ b/extensions/browser/api/socket/udp_socket.h
@@ -49,6 +49,9 @@ class UDPSocket : public Socket {
const std::vector<std::string>& GetJoinedGroups() const;
+ bool allow_address_reuse() const { return allow_address_reuse_; }
+ void set_allow_address_reuse(bool allow) { allow_address_reuse_ = allow; }
+
protected:
int WriteImpl(net::IOBuffer* io_buffer,
int io_buffer_size,
@@ -73,6 +76,10 @@ class UDPSocket : public Socket {
CompletionCallback send_to_callback_;
std::vector<std::string> multicast_groups_;
+
+ // Flag indicating whether the address can be bound by multiple sockets - see
+ // sockets_udp.idl
+ bool allow_address_reuse_;
};
// UDP Socket instances from the "sockets.udp" namespace. These are regular
« no previous file with comments | « no previous file | extensions/browser/api/socket/udp_socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698