send

fun send(data: String)(source)

The WebSocket.send() method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value of bufferedAmount by the number of bytes needed to contain the data.

MDN Reference


fun send(data: Blob)(source)
fun send(data: ArrayBufferView<*>)(source)