kvision / pl.treksoft.kvision.remote / Socket

Socket

(js) class Socket

A websocket client implementation.

Constructors

(js)

<init>

A websocket client implementation.

Socket()

Properties

(js)

state

val state: Short

Functions

(js)

close

Close a websocket.

fun close(code: Short = 1000): Unit
(js)

connect

Connect to a websocket.

suspend fun connect(url: String, retryDelay: Long = 1000): Unit
(js)

isClosed

Returns if a websocket is closed.

fun isClosed(): Boolean
(js)

receive

Receive a string from a websocket.

suspend fun receive(): String
(js)

send

Send string to a websocket.

fun send(obj: String): Unit