Add configurable threshold for writability state update.
Add configurable parameters in RTCConfiguration with the default value
given by the constants CONNECTION_WRITE_CONNECT_TIME and
CONNECTION_WRITE_CONNECT_FAILURES in the ICE implementation. These two
parameters define the time period for which a candidate pair must wait
for ping response and the minimum number of connectivity checks that
the pair must send without response before its state becomes unreliable
from writable as defined in the current ICE implementation.
Bug: webrtc:8988
Change-Id: I484599b7d776489a87741ffea8926df766095da9
Reviewed-on: https://webrtc-review.googlesource.com/60704
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22411}
diff --git a/api/peerconnectioninterface.h b/api/peerconnectioninterface.h
index 7364aa0..4cb3d65 100644
--- a/api/peerconnectioninterface.h
+++ b/api/peerconnectioninterface.h
@@ -515,6 +515,16 @@
rtc::Optional<int> ice_check_interval_weak_connectivity;
rtc::Optional<int> ice_check_min_interval;
+ // The min time period for which a candidate pair must wait for response to
+ // connectivity checks before it becomes unwritable. This parameter
+ // overrides the default value in the ICE implementation if set.
+ rtc::Optional<int> ice_unwritable_timeout;
+
+ // The min number of connectivity checks that a candidate pair must sent
+ // without receiving response before it becomes unwritable. This parameter
+ // overrides the default value in the ICE implementation if set.
+ rtc::Optional<int> ice_unwritable_min_checks;
+
// The interval in milliseconds at which STUN candidates will resend STUN
// binding requests to keep NAT bindings open.
rtc::Optional<int> stun_candidate_keepalive_interval;