Andy Hin
Andy Hin

Reputation: 31893

WebRTC RTCDataChannel - how to configure to be reliable?

I fired up a RTCDataChannel, and, by default it appears to be in unreliable mode.

I want to configure it to be reliable to get guaranteed packet delivery, but the RTCDataChannelInit configuration doesn't seem to have a setting for this.

dictionary RTCDataChannelInit {
             boolean        ordered = true;
             unsigned short maxPacketLifeTime;
             unsigned short maxRetransmits;
             DOMString      protocol = "";
             boolean        negotiated = false;
             unsigned short id;
}; 

Also, the RTCDataChannel.isReliable is a read-only property.

How do I configure the channel to be in reliable mode?

Upvotes: 7

Views: 1234

Answers (1)

Philipp Hancke
Philipp Hancke

Reputation: 17295

The default is a reliable channel. See the specification, fourth paragraph in that section.

Upvotes: 7

Related Questions