WebSocket

WebSocket

package js-html

extends EventTarget

Available on js

The 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:

Constructor

new (url:String, protocols:Array<String>)

new (url:String)

new (url:String, protocols:String)

Throws:

null DOMError

Variables

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

Methods

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 variables

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–2016 Haxe Foundation
Licensed under a MIT license.
http://api.haxe.org/js/html/WebSocket.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部