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
idreadonlystringThe unique identifier for this data channel.
modereadonlyDataChannelModeThe mode for this data channel.
peerreadonlyPeerThe

Methods

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