Search code examples
webrtcrtcdatachannel

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?


Solution

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