datachannel: Make SendDataParams reliability fields optional<int>
It doesn't make sense to use negative values or 0 to disable the feature, so we use an optional int value. Values bigger than 65535 are clamped down. Bug: webrtc:12730 Change-Id: I6bd9cd92f7d0a70a78cf5a7c91dca52c28d08ba1 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/217760 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Florent Castelli <orphis@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33954}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
d4dece34b6
commit
5183f00d3a
@ -44,11 +44,13 @@ struct DataChannelInit {
|
||||
//
|
||||
// Cannot be set along with |maxRetransmits|.
|
||||
// This is called |maxPacketLifeTime| in the WebRTC JS API.
|
||||
// Negative values are ignored, and positive values are clamped to [0-65535]
|
||||
absl::optional<int> maxRetransmitTime;
|
||||
|
||||
// The max number of retransmissions.
|
||||
//
|
||||
// Cannot be set along with |maxRetransmitTime|.
|
||||
// Negative values are ignored, and positive values are clamped to [0-65535]
|
||||
absl::optional<int> maxRetransmits;
|
||||
|
||||
// This is set by the application and opaque to the WebRTC implementation.
|
||||
|
||||
Reference in New Issue
Block a user