DescriptionAdding PortAllocator option to support cases where sockets can't be bound.
This CL adds the flag "PORTALLOCATOR_ENABLE_ANY_ADDRESS_PORTS", which will
force the creation of ports not bound to any specific network interface.
These are normally only used when network enumeration fails or is disabled,
but in some circumstances (such as the one the test case adds), they're the
only thing that works.
This will result in extra ports being gathered, which is why it's only enabled
behind a flag for now. In the future, we could probably introduce more
sophisticated "pruning" logic that would lessen the impact of the extra ports
when they're redundant, and make the flag the default.
Some other minor changes that were required to make this use case work:
* Allow a TCPPort to be used for outgoing connections even if it tries and
fails to create a server socket.
* Allow Bind to fail if being called before Connect, and the IP is an "any"
address (0.0.0.0 or ::), since this bind would have been mostly pointless
anyway.
* Prevent P2PTransprotChannel from keeping a "backup" candidate pair using
an "any address" network; we only want this for actual networks.
BUG=webrtc:7798
Review-Url: https://codereview.webrtc.org/2936553003
Cr-Commit-Position: refs/heads/master@{#18578}
Committed: https://chromium.googlesource.com/external/webrtc/+/1ee2125909e90058981f123a0e5a665125a92336
Patch Set 1 #
Total comments: 3
Patch Set 2 : Comment fixes #
Total comments: 16
Patch Set 3 : Minor changes (comments, renaming, etc.) #
Messages
Total messages: 14 (8 generated)
|