Web SDK - RainwayPeer.send()

Home > rainway-sdk > RainwayPeer > send

RainwayPeer.send() method

Send a message to this peer.

See: https://docs.rainway.com/docs/data-channels

Signature:

send(channelName: string, data: Uint8Array | string): void;

Parameters

ParameterTypeDescription
channelNamestringThe name of the Data Channel to send over.
dataUint8Array | stringBinary data to send. If the argument is a string, it is UTF-8-encoded first.

Returns:

void