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

Unified Diff: webrtc/p2p/base/packetsocketfactory.h

Issue 1556743002: Bind a socket to a network if the network handle is set. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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: webrtc/p2p/base/packetsocketfactory.h
diff --git a/webrtc/p2p/base/packetsocketfactory.h b/webrtc/p2p/base/packetsocketfactory.h
index 54037241b0a71ce26c5f4ac7afb4fdbb95073850..326f03ce0885c215f3bb61f5be5415d385823d19 100644
--- a/webrtc/p2p/base/packetsocketfactory.h
+++ b/webrtc/p2p/base/packetsocketfactory.h
@@ -11,12 +11,14 @@
#ifndef WEBRTC_P2P_BASE_PACKETSOCKETFACTORY_H_
#define WEBRTC_P2P_BASE_PACKETSOCKETFACTORY_H_
+#include "webrtc/base/common.h"
#include "webrtc/base/proxyinfo.h"
namespace rtc {
class AsyncPacketSocket;
class AsyncResolverInterface;
+class Network;
class PacketSocketFactory {
public:
@@ -32,6 +34,18 @@ class PacketSocketFactory {
virtual AsyncPacketSocket* CreateUdpSocket(const SocketAddress& address,
uint16_t min_port,
uint16_t max_port) = 0;
+ // TODO(honghaiz): Make this pure virtual method when all subclasses in
+ // Chrome define this.
+ virtual AsyncPacketSocket* CreateUdpSocketOnNetwork(
+ const SocketAddress& address,
+ uint16_t min_port,
+ uint16_t max_port,
+ const Network* network) {
+ // Should not have reached here.
+ ASSERT(false);
+ return nullptr;
+ }
+
virtual AsyncPacketSocket* CreateServerTcpSocket(
const SocketAddress& local_address,
uint16_t min_port,

Powered by Google App Engine
This is Rietveld 408576698