RTCDataChannel extension type

The RTCDataChannel interface represents a network channel which can be used for bidirectional peer-to-peer transfers of arbitrary data. Every data channel is associated with an RTCPeerConnection, and each peer connection can have up to a theoretical maximum of 65,534 data channels (the actual limit may vary from browser to browser).

To create a data channel and ask a remote peer to join you, call the RTCPeerConnection's RTCPeerConnection.createDataChannel method. The peer being invited to exchange data receives a RTCPeerConnection.datachannel_event event (which has type RTCDataChannelEvent) to let it know the data channel has been added to the connection.

RTCDataChannel is a transferable object.

on
Implemented types
Available extensions

Properties

binaryType BinaryType
getter/setter pair
bufferedAmount int
no setter
bufferedAmountLowThreshold int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
id int?
no setter
label String
no setter
maxPacketLifeTime int?
no setter
maxRetransmits int?
no setter
negotiated bool
no setter
onbufferedamountlow EventHandler?
getter/setter pair
onclose EventHandler?
getter/setter pair
onclosing EventHandler?
getter/setter pair
onerror EventHandler?
getter/setter pair
onmessage EventHandler?
getter/setter pair
onopen EventHandler?
getter/setter pair
ordered bool
no setter
protocol String
no setter
readyState RTCDataChannelState
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addEventListener(String type, EventListener? callback, [JSAny options]) → void
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
inherited
close() → void
The RTCDataChannel.close() method closes the RTCDataChannel. Either peer is permitted to call this method to initiate closure of the channel.
dispatchEvent(Event event) bool
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEventListener(String type, EventListener? callback, [JSAny options]) → void
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.
inherited
send(JSAny data) → void
The send() method of the RTCDataChannel interface sends data across the data channel to the remote peer. This can be done any time except during the initial process of creating the underlying transport channel. Data sent before connecting is buffered if possible (or an error occurs if it's not possible), and is also buffered if sent while the connection is closing or closed.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited