class Socket
A websocket client implementation.
Socket()
A websocket client implementation. |
val state: Short |
fun close(code: Short = 1000): Unit
Close a websocket. |
|
suspend fun connect(url: String, retryDelay: Long = 1000): Unit
Connect to a websocket. |
|
fun isClosed(): Boolean
Returns if a websocket is closed. |
|
suspend fun receive(): String
Receive a string from a websocket. |
|
fun send(obj: String): Unit
Send string to a websocket. |
fun <T> Any?.createInstance(vararg args: dynamic): T
Helper function for creating JavaScript objects from dynamic constructors. |