send

fun send(data: String)(source)

The send() method of the RTCDataChannel interface sends data across the data channel to the remote peer. This can be done any time except during the initial process of creating the underlying transport channel. Data sent before connecting is buffered if possible (or an error occurs if it's not possible), and is also buffered if sent while the connection is closing or closed.

MDN Reference


fun send(data: Blob)(source)
fun send(data: ArrayBuffer)(source)