Add configurable STUN binding request interval.
STUN candidates use STUN binding requests to keep NAT bindings open. The interval at which the STUN keepalive pings are sent is configurable now via RTCConfiguration. TBR=sakal@webrtc.org Bug: None Change-Id: I5f99ea3fe1e9042fa2bf7dcab0aace78f57739e6 Reviewed-on: https://webrtc-review.googlesource.com/54180 Commit-Queue: Qingsi Wang <qingsi@google.com> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22109}
This commit is contained in:
@ -342,6 +342,7 @@ public class PeerConnection {
|
||||
}
|
||||
|
||||
/** Java version of PeerConnectionInterface.RTCConfiguration */
|
||||
// TODO(qingsi): Resolve the naming inconsistency of fields with/without units.
|
||||
public static class RTCConfiguration {
|
||||
public IceTransportsType iceTransportsType;
|
||||
public List<IceServer> iceServers;
|
||||
@ -359,6 +360,10 @@ public class PeerConnection {
|
||||
public boolean pruneTurnPorts;
|
||||
public boolean presumeWritableWhenFullyRelayed;
|
||||
public Integer iceCheckMinInterval;
|
||||
// The interval in milliseconds at which STUN candidates will resend STUN binding requests
|
||||
// to keep NAT bindings open.
|
||||
// The default value in the implementation is used if this field is null.
|
||||
public Integer stunCandidateKeepaliveIntervalMs;
|
||||
public boolean disableIPv6OnWifi;
|
||||
// By default, PeerConnection will use a limited number of IPv6 network
|
||||
// interfaces, in order to avoid too many ICE candidate pairs being created
|
||||
@ -405,6 +410,7 @@ public class PeerConnection {
|
||||
pruneTurnPorts = false;
|
||||
presumeWritableWhenFullyRelayed = false;
|
||||
iceCheckMinInterval = null;
|
||||
stunCandidateKeepaliveIntervalMs = null;
|
||||
disableIPv6OnWifi = false;
|
||||
maxIPv6Networks = 5;
|
||||
iceRegatherIntervalRange = null;
|
||||
@ -499,6 +505,11 @@ public class PeerConnection {
|
||||
return iceCheckMinInterval;
|
||||
}
|
||||
|
||||
@CalledByNative("RTCConfiguration")
|
||||
Integer getStunCandidateKeepaliveInterval() {
|
||||
return stunCandidateKeepaliveIntervalMs;
|
||||
}
|
||||
|
||||
@CalledByNative("RTCConfiguration")
|
||||
boolean getDisableIPv6OnWifi() {
|
||||
return disableIPv6OnWifi;
|
||||
|
||||
Reference in New Issue
Block a user