Home > @rainway/web > DataChannelEvents > message
DataChannelEvents.message() method
Raised when a message arrives via the data channel.
If message.respond !== undefined, the remote peer expects a response, and you should call message.respond(payload) to respond.
Signature:
message(message: MessageEvent): void | Promise<void>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| message | MessageEvent | the received message |
Returns:
void | Promise<void>
