commit | 5c3c104ba0f843b9c46a921c8d6c2bd6c068acd2 | [log] [tgz] |
---|---|---|
author | deadbeef <deadbeef@webrtc.org> | Fri Aug 04 15:01:57 2017 -0700 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Aug 04 22:01:57 2017 +0000 |
tree | 62cba79b42be521599e06be10f029f8e64d3b404 | |
parent | d48f56de1f06d62fcb46bb9f20bd5f336e80aae9 [diff] |
Make Port (and subclasses) fully "Network"-based, instead of IP-based. For ICE, we want sockets that are bound to specific network interfaces, rather than to specific IP addresses. So, a while ago, we added a "Network" class that gets passed into the Port constructor, in addition to the IP address as before. But we never finished the job of removing the IP address field, such that a Port only guarantees something about the network interface it's associated with, and not the specific IP address it ends up with. This CL does that, and as a consequence, if a port ends up bound to an IP address other than the "best" one (returned by Network::GetBestIP), this *won't* be treated as an error. This is relevant to Android, where even though we pass an IP address into "Bind" as a way of identifying the network, the socket actually gets bound using "android_setsocknetwork", which doesn't provide any guarantees about the IP address. So, if a network interface has multiple IPv6 addresses (for instance), we may not correctly predict the one the OS will choose, and that's ok. This CL also moves "SetAlternateLocalAddress" from VirtualSocket to VirtualSocketServer, which makes for much more readable test code. The next step, if there is one, is to pass along the Network class all the way to SocketServer::Bind. Then the socket server could do smart things with the network information. We could even stick a platform- specific network handle in the Network object, such that the socket server could use it for the binding, or for "sendmsg", for example. See bug 7026 for more context about the sendmsg idea. BUG=webrtc:7715 Review-Url: https://codereview.webrtc.org/2989303002 Cr-Commit-Position: refs/heads/master@{#19251}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See http://www.webrtc.org/native-code/development for instructions on how to get started developing with the native code.