Web SDK - DataChannel

Home > @rainway/web > DataChannel

DataChannel class

Represents a data channel between oursevles and a remote peer

Signature:

export declare class DataChannel extends EventEmitter<DataChannelEvents> 

Extends: EventEmitter<DataChannelEvents>

Properties

PropertyModifiersTypeDescription
idstringThe unique identifier for this data channel.
modeDataChannelModeThe mode for this data channel.
peerPeerThe

Methods

MethodModifiersDescription
send(data)Transmits data to the remote peer. If the data is a string, it will be encoded and sent as UTF-8.