toggle menu
korge-root
5.1.0
js
switch theme
search in API
korge-core
/
korlibs.io.net.ws
/
JsWebSocketClient
Js
Web
Socket
Client
js
class
JsWebSocketClient
(
val
url
:
String
,
val
protocols
:
List
<
String
>
?
,
val
DEBUG
:
Boolean
,
val
headers
:
Http.Headers
)
:
WebSocketClient
Members
Constructors
Js
Web
Socket
Client
Link copied to clipboard
js
constructor
(
url
:
String
,
protocols
:
List
<
String
>
?
,
DEBUG
:
Boolean
,
headers
:
Http.Headers
)
Properties
DEBUG
Link copied to clipboard
js
val
DEBUG
:
Boolean
headers
Link copied to clipboard
js
val
headers
:
Http.Headers
jsws
Link copied to clipboard
js
val
jsws
:
WebSocket
on
Any
Message
Link copied to clipboard
js
val
onAnyMessage
:
Signal
<
Any
>
on
Binary
Message
Link copied to clipboard
js
val
onBinaryMessage
:
Signal
<
ByteArray
>
on
Close
Link copied to clipboard
js
val
onClose
:
Signal
<
WebSocketClient.CloseInfo
>
on
Error
Link copied to clipboard
js
val
onError
:
Signal
<
Throwable
>
on
Open
Link copied to clipboard
js
val
onOpen
:
Signal
<
Unit
>
on
String
Message
Link copied to clipboard
js
val
onStringMessage
:
Signal
<
String
>
protocols
Link copied to clipboard
js
val
protocols
:
List
<
String
>
?
url
Link copied to clipboard
js
val
url
:
String
Functions
close
Link copied to clipboard
js
open
override
fun
close
(
code
:
Int
,
reason
:
String
)
fun
close
(
info
:
WsCloseInfo
)
init
Link copied to clipboard
js
suspend
fun
init
(
)
message
Channel
Link copied to clipboard
js
fun
messageChannel
(
limit
:
Int
=
Channel.UNLIMITED
)
:
Channel
<
Any
>
message
Channel
Binary
Link copied to clipboard
js
fun
messageChannelBinary
(
limit
:
Int
=
Channel.UNLIMITED
)
:
Channel
<
Any
>
message
Channel
String
Link copied to clipboard
js
fun
messageChannelString
(
limit
:
Int
=
Channel.UNLIMITED
)
:
Channel
<
Any
>
send
Link copied to clipboard
js
open
suspend override
fun
send
(
message
:
ByteArray
)
open
suspend override
fun
send
(
message
:
String
)