send

abstract suspend fun send(text: String)(source)

Sends a text message through the data channel.

Report a problem

Parameters

text

The text message to send.

See also

Throws

if the channel is closed or not open for sending.

if the message cannot be sent by the underlying WebRTC transport.


abstract suspend fun send(bytes: ByteArray)(source)

Sends binary data through the data channel.

Report a problem

Parameters

bytes

The binary data to send.

See also

Throws

if the channel is closed or not open for sending.

if the message cannot be sent by the underlying WebRTC transport.