Index: webrtc/base/physicalsocketserver.cc |
diff --git a/webrtc/base/physicalsocketserver.cc b/webrtc/base/physicalsocketserver.cc |
index 3e454527ca80f3e86282d129cdb403fc5b5c5370..67fbea0a2fc60bacd5b2711b62e0947888ca30cc 100644 |
--- a/webrtc/base/physicalsocketserver.cc |
+++ b/webrtc/base/physicalsocketserver.cc |
@@ -7,6 +7,7 @@ |
* in the file PATENTS. All contributing project authors may |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
+#include "webrtc/base/physicalsocketserver.h" |
#if defined(_MSC_VER) && _MSC_VER < 1300 |
#pragma warning(disable:4786) |
@@ -44,7 +45,7 @@ |
#include "webrtc/base/byteorder.h" |
#include "webrtc/base/common.h" |
#include "webrtc/base/logging.h" |
-#include "webrtc/base/physicalsocketserver.h" |
+#include "webrtc/base/networkmonitor.h" |
#include "webrtc/base/timeutils.h" |
#include "webrtc/base/winping.h" |
#include "webrtc/base/win32socketinit.h" |
@@ -174,6 +175,14 @@ int PhysicalSocket::Bind(const SocketAddress& bind_addr) { |
dbg_addr_.append(GetLocalAddress().ToString()); |
} |
#endif |
+ if (ss_->network_binder()) { |
+ int result = |
+ ss_->network_binder()->BindSocketToNetwork(s_, bind_addr.ipaddr()); |
+ if (result < 0) { |
+ LOG(LS_INFO) << "Binding socket to network address " |
+ << bind_addr.ipaddr().ToString() << " result " << result; |
+ } |
+ } |
return err; |
} |
@@ -1109,7 +1118,7 @@ private: |
PhysicalSocketServer* ss_; |
WSAEVENT hev_; |
}; |
-#endif // WEBRTC_WIN |
+#endif // WEBRTC_WIN |
// Sets the value of a boolean value to false when signaled. |
class Signaler : public EventDispatcher { |
@@ -1603,6 +1612,6 @@ bool PhysicalSocketServer::Wait(int cmsWait, bool process_io) { |
// Done |
return true; |
} |
-#endif // WEBRTC_WIN |
+#endif // WEBRTC_WIN |
} // namespace rtc |