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

Unified Diff: webrtc/base/socketserver.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/base/socketserver.h
diff --git a/webrtc/base/socketserver.h b/webrtc/base/socketserver.h
index 15c56f4612798e5c2bcba3972d664ce774c84cde..1b4136d74e3246010ac770f13d5baf2337bc8307 100644
--- a/webrtc/base/socketserver.h
+++ b/webrtc/base/socketserver.h
@@ -16,6 +16,7 @@
namespace rtc {
class MessageQueue;
+class NetworkBinderInterface;
// Provides the ability to wait for activity on a set of sockets. The Thread
// class provides a nice wrapper on a socket server.
@@ -39,6 +40,16 @@ class SocketServer : public SocketFactory {
// Causes the current wait (if one is in progress) to wake up.
virtual void WakeUp() = 0;
+
+ // A network binder will bind the created sockets to a network.
+ // It is only used in PhysicalSocketServer.
+ void set_network_binder(NetworkBinderInterface* binder) {
+ network_binder_ = binder;
+ }
+ NetworkBinderInterface* network_binder() const { return network_binder_; }
+
+ private:
+ NetworkBinderInterface* network_binder_ = nullptr;
};
} // namespace rtc

Powered by Google App Engine
This is Rietveld 408576698