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
Parameter | Type | Description |
---|---|---|
channelName | string | The name of the Data Channel to send over. |
data | Uint8Array | string | Binary data to send. If the argument is a string, it is UTF-8-encoded first. |
Returns:
void