This reverts commit 0a2955f227666efd87b2a303a69c083ef801c528.
Revert "In the past, P2PPortAllocator.enable_multiple_routes is the indicator whether we should bind to the any address. It's easy to translate that into a port allocator flag in P2PPortAllocator's ctor. Going forward, we have to depend on an asynchronous permission check to determine whether gathering local address is allowed or not, hence the current way of passing it through constructor approach won't work any more. The asynchronous check will trigger SignalNetowrksChanged so we could only check that inside DoAllocate."
This reverts commit ba9ab4cd8d2e8fbc068dc36b5e6f6331d7deeccf.
TBR=pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1288843003 .
Cr-Commit-Position: refs/heads/master@{#9729}
This was already working in most cases, but not for some corner cases:
* If the PORTALLOCATOR_ENABLE_SHARED_SOCKET flag is not set
* If both a STUN server and TURN server are configured
I added unit tests for these cases, and centralized the code that gets
STUN server addresses in order to fix these and any related issues.
BUG=webrtc:4215
Review URL: https://codereview.webrtc.org/1215713003
Cr-Commit-Position: refs/heads/master@{#9596}
UDP case should not be changed.
Active TCPConnection will initiate Reconnect after OnClose and when Send or Ping fails.
Passive TCPConnection will prune itself as usual as the active side will create a new connection.
The Reconnect could make P2PCT choose a different best_connection in the case where connectivities exist b/w more than 1 Network.
Also, to avoid upper layer triggers ice restart, the WRITE_TIMEOUT caused by the socket disconnection is delayed to give the reconnect mechanism chance to kick in. The timeout event is only fired if the reconnect can't work in 5 sec. If the reconnect, there should be no ICE disconnected state trigger either in active or passive side.
BUG=1926
R=pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/31359004
Cr-Commit-Position: refs/heads/master@{#8929}