package js.html
extends EventTarget
Available on jsThe
WebSocket
object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.Documentation WebSocket by Mozilla Contributors, licensed under CC-BY-SA 2.5.
See:
new (url:String, protocols:Array<String>)
new (url:String)
new (url:String, protocols:String)
Throws:
null |
DOMError |
---|
binaryType:BinaryType
read only bufferedAmount:Int
read only extensions:String
onclose:Function
onerror:Function
onmessage:Function
onopen:Function
read only protocol:String
read only readyState:Int
read only url:String
close (?code:Int, ?reason:String):Void
Throws:
null |
DOMError |
---|
send (data:ArrayBufferView):Void
send (data:String):Void
send (data:Blob):Void
send (data:ArrayBuffer):Void
Throws:
null |
DOMError |
---|
static inline read only CLOSED:Int = 3
static inline read only CLOSING:Int = 2
static inline read only CONNECTING:Int = 0
static inline read only OPEN:Int = 1
© 2005–2018 Haxe Foundation
Licensed under a MIT license.
https://api.haxe.org/js/html/WebSocket.html