Allow applications to limit the ICE check rate through RTCConfiguration

If an application sets a non-null value in RTCConfiguration.iceCheckMinInterval, we do not sent STUN pings more often than that. This is useful for bandwidth constrained scenarios.

This CL also increases the maximum STUN ping timeout to 60 seconds up from its previous value of 5 (which meant that a ping response received 5 seconds later would not be counted), and allows the RTT estimate to go up to 60 seconds from its previous limit of 3. RTTs above 3 seconds are possible on mobile links. (webrtc:7109)

This CL was originally written by pthatcher@, I am just submitting it after a minor cleanup.

BUG=webrtc:7082, webrtc:7109

Review-Url: https://codereview.webrtc.org/2670053002
Cr-Commit-Position: refs/heads/master@{#16421}
This commit is contained in:
skvlad
2017-02-02 11:50:14 -08:00
committed by Commit bot
parent e5bd70223d
commit 5107246d4b
11 changed files with 62 additions and 9 deletions

View File

@ -160,6 +160,7 @@ public class PeerConnection {
public int iceCandidatePoolSize;
public boolean pruneTurnPorts;
public boolean presumeWritableWhenFullyRelayed;
public Integer iceCheckMinInterval;
public RTCConfiguration(List<IceServer> iceServers) {
iceTransportsType = IceTransportsType.ALL;
@ -177,6 +178,7 @@ public class PeerConnection {
iceCandidatePoolSize = 0;
pruneTurnPorts = false;
presumeWritableWhenFullyRelayed = false;
iceCheckMinInterval = null;
}
};