Add pruneTurnPorts to the IOS RTCConfiguration.
BUG= R=pthatcher@webrtc.org TBR=tkchin@webrt.org Review URL: https://codereview.webrtc.org/2120553002 . Cr-Commit-Position: refs/heads/master@{#13368}
This commit is contained in:
parent
5622c5eae5
commit
e2e35ca55d
@ -33,6 +33,7 @@
|
|||||||
_iceBackupCandidatePairPingInterval;
|
_iceBackupCandidatePairPingInterval;
|
||||||
@synthesize keyType = _keyType;
|
@synthesize keyType = _keyType;
|
||||||
@synthesize iceCandidatePoolSize = _iceCandidatePoolSize;
|
@synthesize iceCandidatePoolSize = _iceCandidatePoolSize;
|
||||||
|
@synthesize pruneTurnPorts = _pruneTurnPorts;
|
||||||
@synthesize presumeWritableWhenFullyRelayed = _presumeWritableWhenFullyRelayed;
|
@synthesize presumeWritableWhenFullyRelayed = _presumeWritableWhenFullyRelayed;
|
||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
@ -60,6 +61,7 @@
|
|||||||
config.ice_backup_candidate_pair_ping_interval;
|
config.ice_backup_candidate_pair_ping_interval;
|
||||||
_keyType = RTCEncryptionKeyTypeECDSA;
|
_keyType = RTCEncryptionKeyTypeECDSA;
|
||||||
_iceCandidatePoolSize = config.ice_candidate_pool_size;
|
_iceCandidatePoolSize = config.ice_candidate_pool_size;
|
||||||
|
_pruneTurnPorts = config.prune_turn_ports;
|
||||||
_presumeWritableWhenFullyRelayed =
|
_presumeWritableWhenFullyRelayed =
|
||||||
config.presume_writable_when_fully_relayed;
|
config.presume_writable_when_fully_relayed;
|
||||||
}
|
}
|
||||||
@ -68,7 +70,7 @@
|
|||||||
|
|
||||||
- (NSString *)description {
|
- (NSString *)description {
|
||||||
return [NSString stringWithFormat:
|
return [NSString stringWithFormat:
|
||||||
@"RTCConfiguration: {\n%@\n%@\n%@\n%@\n%@\n%@\n%@\n%d\n%d\n%d\n%d\n%d\n}\n",
|
@"RTCConfiguration: {\n%@\n%@\n%@\n%@\n%@\n%@\n%@\n%d\n%d\n%d\n%d\n%d\n%d\n}\n",
|
||||||
_iceServers,
|
_iceServers,
|
||||||
[[self class] stringForTransportPolicy:_iceTransportPolicy],
|
[[self class] stringForTransportPolicy:_iceTransportPolicy],
|
||||||
[[self class] stringForBundlePolicy:_bundlePolicy],
|
[[self class] stringForBundlePolicy:_bundlePolicy],
|
||||||
@ -81,6 +83,7 @@
|
|||||||
_iceConnectionReceivingTimeout,
|
_iceConnectionReceivingTimeout,
|
||||||
_iceBackupCandidatePairPingInterval,
|
_iceBackupCandidatePairPingInterval,
|
||||||
_iceCandidatePoolSize,
|
_iceCandidatePoolSize,
|
||||||
|
_pruneTurnPorts,
|
||||||
_presumeWritableWhenFullyRelayed];
|
_presumeWritableWhenFullyRelayed];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,6 +128,7 @@
|
|||||||
nativeConfig->certificates.push_back(certificate);
|
nativeConfig->certificates.push_back(certificate);
|
||||||
}
|
}
|
||||||
nativeConfig->ice_candidate_pool_size = _iceCandidatePoolSize;
|
nativeConfig->ice_candidate_pool_size = _iceCandidatePoolSize;
|
||||||
|
nativeConfig->prune_turn_ports = _pruneTurnPorts;
|
||||||
nativeConfig->presume_writable_when_fully_relayed =
|
nativeConfig->presume_writable_when_fully_relayed =
|
||||||
_presumeWritableWhenFullyRelayed;
|
_presumeWritableWhenFullyRelayed;
|
||||||
|
|
||||||
|
|||||||
@ -93,6 +93,9 @@ RTC_EXPORT
|
|||||||
/** ICE candidate pool size as defined in JSEP. Default is 0. */
|
/** ICE candidate pool size as defined in JSEP. Default is 0. */
|
||||||
@property(nonatomic, assign) int iceCandidatePoolSize;
|
@property(nonatomic, assign) int iceCandidatePoolSize;
|
||||||
|
|
||||||
|
/** Prune turn ports on the same network to the same turn server. Default is false. */
|
||||||
|
@property(nonatomic, assign) bool pruneTurnPorts;
|
||||||
|
|
||||||
/** If set to true, this means the ICE transport should presume TURN-to-TURN
|
/** If set to true, this means the ICE transport should presume TURN-to-TURN
|
||||||
* candidate pairs will succeed, even before a binding response is received.
|
* candidate pairs will succeed, even before a binding response is received.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -44,6 +44,7 @@
|
|||||||
config.iceBackupCandidatePairPingInterval = interval;
|
config.iceBackupCandidatePairPingInterval = interval;
|
||||||
config.continualGatheringPolicy =
|
config.continualGatheringPolicy =
|
||||||
RTCContinualGatheringPolicyGatherContinually;
|
RTCContinualGatheringPolicyGatherContinually;
|
||||||
|
config.pruneTurnPorts = true;
|
||||||
|
|
||||||
std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration>
|
std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration>
|
||||||
nativeConfig([config createNativeConfiguration]);
|
nativeConfig([config createNativeConfiguration]);
|
||||||
@ -68,6 +69,7 @@
|
|||||||
EXPECT_EQ(interval, nativeConfig->ice_backup_candidate_pair_ping_interval);
|
EXPECT_EQ(interval, nativeConfig->ice_backup_candidate_pair_ping_interval);
|
||||||
EXPECT_EQ(webrtc::PeerConnectionInterface::GATHER_CONTINUALLY,
|
EXPECT_EQ(webrtc::PeerConnectionInterface::GATHER_CONTINUALLY,
|
||||||
nativeConfig->continual_gathering_policy);
|
nativeConfig->continual_gathering_policy);
|
||||||
|
EXPECT_EQ(true, nativeConfig->prune_turn_ports);
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user