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