toggle menu
korge-root
5.1.0
common
switch theme
search in API
korge-core
/
korlibs.io.net.ws
/
WebSocketClient
Web
Socket
Client
abstract
class
WebSocketClient
Inheritors
RawSocketWebSocketClient
JsWebSocketClient
Members
Types
Close
Info
Link copied to clipboard
data
class
CloseInfo
(
val
code
:
Int
,
val
message
:
String
?
,
val
wasClean
:
Boolean
)
Close
Reasons
Link copied to clipboard
object
CloseReasons
Properties
on
Any
Message
Link copied to clipboard
val
onAnyMessage
:
Signal
<
Any
>
on
Binary
Message
Link copied to clipboard
val
onBinaryMessage
:
Signal
<
ByteArray
>
on
Close
Link copied to clipboard
val
onClose
:
Signal
<
WebSocketClient.CloseInfo
>
on
Error
Link copied to clipboard
val
onError
:
Signal
<
Throwable
>
on
Open
Link copied to clipboard
val
onOpen
:
Signal
<
Unit
>
on
String
Message
Link copied to clipboard
val
onStringMessage
:
Signal
<
String
>
protocols
Link copied to clipboard
val
protocols
:
List
<
String
>
?
url
Link copied to clipboard
val
url
:
String
Functions
close
Link copied to clipboard
fun
close
(
info
:
WsCloseInfo
)
open
fun
close
(
code
:
Int
=
1000
,
reason
:
String
=
"OK"
)
message
Channel
Link copied to clipboard
fun
messageChannel
(
limit
:
Int
=
Channel.UNLIMITED
)
:
Channel
<
Any
>
message
Channel
Binary
Link copied to clipboard
fun
messageChannelBinary
(
limit
:
Int
=
Channel.UNLIMITED
)
:
Channel
<
Any
>
message
Channel
String
Link copied to clipboard
fun
messageChannelString
(
limit
:
Int
=
Channel.UNLIMITED
)
:
Channel
<
Any
>
send
Link copied to clipboard
open
suspend
fun
send
(
message
:
ByteArray
)
open
suspend
fun
send
(
message
:
String
)