package js.html
extends EventTarget
Available on jsThe
WebSocketobject 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:BinaryTyperead only bufferedAmount:Intread only extensions:Stringonclose:Functiononerror:Functiononmessage:Functiononopen:Functionread only protocol:Stringread only readyState:Intread only url:Stringclose (?code:Int, ?reason:String):VoidThrows:
null |
DOMError |
|---|
send (data:ArrayBufferView):Voidsend (data:String):Voidsend (data:Blob):Voidsend (data:ArrayBuffer):VoidThrows:
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