dom / latest / rtcdatachannel / ordered.html /

RTCDataChannel.ordered

The read-only RTCDataChannel property ordered indicates whether or not the data channel guarantees in-order delivery of messages; the default is true, which indicates that the data channel is indeed ordered. This is set when the RTCDataChannel is created, by setting the ordered property on the object passed as RTCPeerConnection.createDataChannel()'s options parameter.

Syntax

var ordered = aDataChannel.ordered;

A boolean value which is true if in-order delivery is guaranteed and is otherwise false.

Example

var pc = new RTCPeerConnection();
var dc = pc.createDataChannel("my channel");

if (!dc.ordered) {
  // Handle unordered messaging
}

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
ordered
30
79
22
No
17
11
4.4
30
22
18
11
2.0

See also

© 2005–2021 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/ordered