Node.js SDK - MessageEventRequest

Home > @rainway/native > MessageEventRequest

MessageEventRequest class

An event that occurs when a DataChannel gets a message that expects a response.

Signature:

export declare class MessageEventRequest extends BaseEvent<Uint8Array> 

Extends: BaseEvent<Uint8Array>

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the MessageEventRequest class.

Properties

PropertyModifiersTypeDescription
asStringstringUTF8 representation of the message data.
typeMessageEventType.RequestThe message type, which indicates whether a response is expected.

Methods

MethodModifiersDescription
respond(response)Respond to this request.