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

Unified Diff: content/browser/renderer_host/p2p/socket_host.h

Issue 2140693002: Support port range for IPC P2P UDP sockets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address tommi's comments Created 4 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: content/browser/renderer_host/p2p/socket_host.h
diff --git a/content/browser/renderer_host/p2p/socket_host.h b/content/browser/renderer_host/p2p/socket_host.h
index 70e7276a0dec50576297ad5d72592fdc792964b8..72592ee9c0257a1d2dd49ff7e0cc021a9df63315 100644
--- a/content/browser/renderer_host/p2p/socket_host.h
+++ b/content/browser/renderer_host/p2p/socket_host.h
@@ -44,8 +44,18 @@ class CONTENT_EXPORT P2PSocketHost {
virtual ~P2PSocketHost();
- // Initalizes the socket. Returns false when initiazations fails.
+ // Initalizes the socket. Returns false when initialization fails.
+ // |min_port| and |max_port| specify the valid range of allowed ports.
+ // |min_port| must be less than or equal to |max_port|.
+ // If |min_port| is zero, |max_port| must also be zero and it means all ports
+ // are valid.
Mike West 2016/07/14 09:21:06 Can these restrictions be enforced via `bad_messag
Guido Urdaneta 2016/07/14 10:59:09 Done.
+ // If |local_address.port()| is zero, the socket will be initialized to a port
+ // in the valid range.
+ // If |local_address.port()| is nonzero and not in the valid range,
+ // initialization will fail.
virtual bool Init(const net::IPEndPoint& local_address,
+ uint16_t min_port,
+ uint16_t max_port,
const P2PHostAndIPEndPoint& remote_address) = 0;
// Sends |data| on the socket to |to|.
« no previous file with comments | « content/browser/renderer_host/p2p/socket_dispatcher_host.cc ('k') | content/browser/renderer_host/p2p/socket_host_tcp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698