toggle menu
kilua-project
0.0.17
common
switch theme
search in API
kilua-dom
/
web.dom
/
WebSocket
Web
Socket
open
class
WebSocket
(
url
:
String
,
protocols
:
JsAny
?
)
:
EventTarget
,
JsAny
Exposes the JavaScript
WebSocket
to Kotlin
Members
Constructors
Web
Socket
Link copied to clipboard
constructor
(
url
:
String
,
protocols
:
JsAny
?
)
Types
Companion
Link copied to clipboard
object
Companion
Properties
binary
Type
Link copied to clipboard
var
binaryType
:
BinaryType
buffered
Amount
Link copied to clipboard
open
val
bufferedAmount
:
JsNumber
extensions
Link copied to clipboard
open
val
extensions
:
String
onclose
Link copied to clipboard
var
onclose
:
(
Event
)
->
Unit
?
onerror
Link copied to clipboard
var
onerror
:
(
Event
)
->
Unit
?
onmessage
Link copied to clipboard
var
onmessage
:
(
MessageEvent
)
->
Unit
?
onopen
Link copied to clipboard
var
onopen
:
(
Event
)
->
Unit
?
protocol
Link copied to clipboard
open
val
protocol
:
String
ready
State
Link copied to clipboard
open
val
readyState
:
Short
url
Link copied to clipboard
open
val
url
:
String
Functions
add
Event
Listener
Link copied to clipboard
fun
addEventListener
(
type
:
String
,
callback
:
(
Event
)
->
Unit
?
)
fun
addEventListener
(
type
:
String
,
callback
:
EventListener
?
)
fun
addEventListener
(
type
:
String
,
callback
:
(
Event
)
->
Unit
?
,
options
:
Boolean
)
fun
addEventListener
(
type
:
String
,
callback
:
(
Event
)
->
Unit
?
,
options
:
AddEventListenerOptions
)
fun
addEventListener
(
type
:
String
,
callback
:
EventListener
?
,
options
:
Boolean
)
fun
addEventListener
(
type
:
String
,
callback
:
EventListener
?
,
options
:
AddEventListenerOptions
)
close
Link copied to clipboard
fun
close
(
code
:
Short
,
reason
:
String
)
dispatch
Event
Link copied to clipboard
fun
dispatchEvent
(
event
:
Event
)
:
Boolean
remove
Event
Listener
Link copied to clipboard
fun
removeEventListener
(
type
:
String
,
callback
:
(
Event
)
->
Unit
?
)
fun
removeEventListener
(
type
:
String
,
callback
:
EventListener
?
)
fun
removeEventListener
(
type
:
String
,
callback
:
(
Event
)
->
Unit
?
,
options
:
Boolean
)
fun
removeEventListener
(
type
:
String
,
callback
:
(
Event
)
->
Unit
?
,
options
:
EventListenerOptions
)
fun
removeEventListener
(
type
:
String
,
callback
:
EventListener
?
,
options
:
Boolean
)
fun
removeEventListener
(
type
:
String
,
callback
:
EventListener
?
,
options
:
EventListenerOptions
)
send
Link copied to clipboard
fun
send
(
data
:
String
)
fun
send
(
data
:
Blob
)
fun
send
(
data
:
ArrayBuffer
)
fun
send
(
data
:
ArrayBufferView
)