HomeGuidesAPI Reference
HubBlogChangelogSupport ForumLog In
API Reference

Node.js SDK - DataChannel.request()

Home > @rainway/native > DataChannel > request

DataChannel.request() method

Sends a binary *request* message via this data channel. Awaits a response, and returns a promise that resolves to it. If a string is given, it will be utf-8 encoded before transmission.

Signature:

request(data: string): Promise<string>;

Parameters

ParameterTypeDescription
datastringdata to transmit

Returns:

Promise<string>