kvision-common-remote
/
io.kvision.remote
/
Socket
js
Socket
class
Socket
Content copied to clipboard
A websocket client implementation.
Constructors
Functions
Properties
Constructors
Socket
Link copied to clipboard
js
fun
Socket
()
Content copied to clipboard
Functions
close
Link copied to clipboard
js
fun
close
(code:
Short
= 1000)
Content copied to clipboard
Close a websocket.
connect
Link copied to clipboard
js
suspend fun
connect
(url:
String
, retryDelay:
Long
= 1000)
Content copied to clipboard
Connect to a websocket.
equals
Link copied to clipboard
js
open operator fun
equals
(other:
Any
?):
Boolean
Content copied to clipboard
hashCode
Link copied to clipboard
js
open fun
hashCode
():
Int
Content copied to clipboard
isClosed
Link copied to clipboard
js
fun
isClosed
():
Boolean
Content copied to clipboard
Returns if a websocket is closed.
receive
Link copied to clipboard
js
suspend fun
receive
():
String
Content copied to clipboard
Receive a string from a websocket.
send
Link copied to clipboard
js
fun
send
(obj:
String
)
Content copied to clipboard
Send string to a websocket.
toString
Link copied to clipboard
js
open fun
toString
():
String
Content copied to clipboard
Properties
state
Link copied to clipboard
js
val
state
:
Short
Content copied to clipboard