HomeGuidesAPI Reference
HubBlogChangelogSupport ForumLog In
API Reference

Web SDK - DataChannel.request()

Home > @rainway/web > DataChannel > request

DataChannel.request() method

Transmits data to the remote peer and awaits a response. If the data is a string, it will be encoded and sent as UTF-8.

Signature:

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

Parameters

ParameterTypeDescription
dataUint8Array | stringthe data to transmit

Returns:

Promise<Uint8Array>