Node.js SDK - Peer.createDataChannel()

Home > rainway-sdk-native > Peer > createDataChannel

Peer.createDataChannel() method

Create a new custom user data channel with a specific peer. This is only valid if we were the one who initiated the connection.

Signature:

createDataChannel(name: string, mode: RainwayChannelMode): void;

Parameters

ParameterTypeDescription
namestringName of the channel (will be used for referencing it later if created).
modeRainwayChannelModeChannel mode configuration.

Returns:

void