Prefix bool variable with "should".
This is to address a comment in a CL landed earlier. BUG= Review-Url: https://codereview.webrtc.org/2137223002 Cr-Commit-Position: refs/heads/master@{#13435}
This commit is contained in:
@ -33,8 +33,9 @@
|
|||||||
_iceBackupCandidatePairPingInterval;
|
_iceBackupCandidatePairPingInterval;
|
||||||
@synthesize keyType = _keyType;
|
@synthesize keyType = _keyType;
|
||||||
@synthesize iceCandidatePoolSize = _iceCandidatePoolSize;
|
@synthesize iceCandidatePoolSize = _iceCandidatePoolSize;
|
||||||
@synthesize pruneTurnPorts = _pruneTurnPorts;
|
@synthesize shouldPruneTurnPorts = _shouldPruneTurnPorts;
|
||||||
@synthesize presumeWritableWhenFullyRelayed = _presumeWritableWhenFullyRelayed;
|
@synthesize shouldPresumeWritableWhenFullyRelayed =
|
||||||
|
_shouldPresumeWritableWhenFullyRelayed;
|
||||||
|
|
||||||
- (instancetype)init {
|
- (instancetype)init {
|
||||||
if (self = [super init]) {
|
if (self = [super init]) {
|
||||||
@ -61,8 +62,8 @@
|
|||||||
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;
|
_shouldPruneTurnPorts = config.prune_turn_ports;
|
||||||
_presumeWritableWhenFullyRelayed =
|
_shouldPresumeWritableWhenFullyRelayed =
|
||||||
config.presume_writable_when_fully_relayed;
|
config.presume_writable_when_fully_relayed;
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
@ -83,8 +84,8 @@
|
|||||||
_iceConnectionReceivingTimeout,
|
_iceConnectionReceivingTimeout,
|
||||||
_iceBackupCandidatePairPingInterval,
|
_iceBackupCandidatePairPingInterval,
|
||||||
_iceCandidatePoolSize,
|
_iceCandidatePoolSize,
|
||||||
_pruneTurnPorts,
|
_shouldPruneTurnPorts,
|
||||||
_presumeWritableWhenFullyRelayed];
|
_shouldPresumeWritableWhenFullyRelayed];
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - Private
|
#pragma mark - Private
|
||||||
@ -128,9 +129,9 @@
|
|||||||
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->prune_turn_ports = _shouldPruneTurnPorts ? true : false;
|
||||||
nativeConfig->presume_writable_when_fully_relayed =
|
nativeConfig->presume_writable_when_fully_relayed =
|
||||||
_presumeWritableWhenFullyRelayed;
|
_shouldPresumeWritableWhenFullyRelayed ? true : false;
|
||||||
|
|
||||||
return nativeConfig.release();
|
return nativeConfig.release();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -93,13 +93,15 @@ 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. */
|
/** Prune turn ports on the same network to the same turn server.
|
||||||
@property(nonatomic, assign) bool pruneTurnPorts;
|
* Default is NO.
|
||||||
|
*/
|
||||||
|
@property(nonatomic, assign) BOOL shouldPruneTurnPorts;
|
||||||
|
|
||||||
/** If set to true, this means the ICE transport should presume TURN-to-TURN
|
/** If set to YES, 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.
|
||||||
*/
|
*/
|
||||||
@property(nonatomic, assign) bool presumeWritableWhenFullyRelayed;
|
@property(nonatomic, assign) BOOL shouldPresumeWritableWhenFullyRelayed;
|
||||||
|
|
||||||
- (instancetype)init NS_DESIGNATED_INITIALIZER;
|
- (instancetype)init NS_DESIGNATED_INITIALIZER;
|
||||||
|
|
||||||
|
|||||||
@ -44,7 +44,7 @@
|
|||||||
config.iceBackupCandidatePairPingInterval = interval;
|
config.iceBackupCandidatePairPingInterval = interval;
|
||||||
config.continualGatheringPolicy =
|
config.continualGatheringPolicy =
|
||||||
RTCContinualGatheringPolicyGatherContinually;
|
RTCContinualGatheringPolicyGatherContinually;
|
||||||
config.pruneTurnPorts = true;
|
config.shouldPruneTurnPorts = YES;
|
||||||
|
|
||||||
std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration>
|
std::unique_ptr<webrtc::PeerConnectionInterface::RTCConfiguration>
|
||||||
nativeConfig([config createNativeConfiguration]);
|
nativeConfig([config createNativeConfiguration]);
|
||||||
|
|||||||
Reference in New Issue
Block a user