Developer Documentation

OdinRoom.sendMessage

public sendMessage(message: Uint8Array, peerIdList?: number[]): void

Sends a message to the room.

Parameters

NameTypeDescription
messageUint8ArrayThe message to send as a byte array.
peerIdListnumber[]The list of peer IDs to send the message to. If this is undefined, the message will be sent to all peers. If the list is defined and empty an error will be thrown.

Returns

TypeDescription
void