1 #ifndef OPENTERA_WEBRTC_NATIVE_CLIENT_CONFIGURATIONS_DATA_CHANNEL_CONFIGURATION_H
2 #define OPENTERA_WEBRTC_NATIVE_CLIENT_CONFIGURATIONS_DATA_CHANNEL_CONFIGURATION_H
4 #include <api/data_channel_interface.h>
16 absl::optional<int> m_maxPacketLifeTime;
17 absl::optional<int> m_maxRetransmits;
18 std::string m_protocol;
47 [[nodiscard]]
bool ordered()
const;
50 [[nodiscard]]
const std::string&
protocol()
const;
52 explicit operator webrtc::DataChannelInit()
const;
64 return {
true, absl::nullopt, absl::nullopt,
""};
75 return {
ordered, absl::nullopt, absl::nullopt,
""};
86 return {
true, absl::nullopt, absl::nullopt, std::move(
protocol)};
214 return m_maxPacketLifeTime;
Represents a data channel configuration.
Definition: DataChannelConfiguration.h:14
static DataChannelConfiguration createProtocol(std::string protocol)
Creates a data channel configuration with the specified value.
Definition: DataChannelConfiguration.h:84
static DataChannelConfiguration createMaxRetransmits(int maxRetransmits)
Creates a data channel configuration with the specified value.
Definition: DataChannelConfiguration.h:158
const std::string & protocol() const
Returns the data channel protocol.
Definition: DataChannelConfiguration.h:227
static DataChannelConfiguration createMaxPacketLifeTime(int maxPacketLifeTime)
Creates a data channel configuration with the specified value.
Definition: DataChannelConfiguration.h:107
const absl::optional< int > & maxRetransmits() const
Returns the maximum number of time a message can be retransmitted.
Definition: DataChannelConfiguration.h:221
bool ordered() const
Indicates if the message order must be preserved.
Definition: DataChannelConfiguration.h:206
static DataChannelConfiguration create()
Creates a data channel configuration with default values.
Definition: DataChannelConfiguration.h:62
const absl::optional< int > & maxPacketLifeTime() const
Returns the maximum number of time a message can be retransmitted.
Definition: DataChannelConfiguration.h:212