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
Parameter | Type | Description |
---|---|---|
data | string | data to transmit |
Returns:
Promise<string>