HomeGuidesAPI Reference
HubBlogChangelogSupport ForumLog In
API Reference

Web SDK - DataChannelEvents.message()

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

ParameterTypeDescription
messageMessageEventthe received message

Returns:

void | Promise<void>