Web SDK - MessageEventRequest

Home > @rainway/web > MessageEventRequest

MessageEventRequest interface

A data channel "request" message, expecting a response.

Signature:

export interface MessageEventRequest 

Properties

PropertyModifiersTypeDescription
dataUint8ArrayThe binary data in the message.
typeMessageEventType.RequestThe message type, which indicates whether a response is expected.

Methods

MethodDescription
respond(response)

A callback to send a response to this message.

(The remote peer did something like await channel.request("..."), and the remote promise will resolve to the response provided here.)