Up

module WebSockets

: sig

WebSocket binding

#
type readyState =
# | CONNECTING
# | OPEN
# | CLOSING
# | CLOSED
#
class type ['a] closeEvent =
inherit ['a] Dom.event
#
method code : int Js.readonly_prop
#
method reason : Js.js_string Js.t Js.readonly_prop
#
method wasClean : bool Js.t Js.readonly_prop
#
class type ['a] messageEvent =
inherit ['a] Dom.event
#
method data : Js.js_string Js.t Js.readonly_prop
#
class type webSocket = ('self)
#
method url : Js.js_string Js.t Js.readonly_prop
#
method readyState : readyState Js.readonly_prop
#
method bufferedAmount : int Js.readonly_prop
#
method onopen : ('self Js.t, 'self Dom.event Js.t) Dom.event_listener Js.writeonly_prop
#
method onclose : ('self Js.t, 'self closeEvent Js.t) Dom.event_listener Js.writeonly_prop
#
method onerror : ('self Js.t, 'self Dom.event Js.t) Dom.event_listener Js.writeonly_prop
#
method extensions : Js.js_string Js.t Js.readonly_prop
#
method protocol : Js.js_string Js.t Js.readonly_prop
#
method close : unit Js.meth
#
method close_withCode : int -> unit Js.meth
#
method close_withCodeAndReason : int -> Js.js_string Js.t -> unit Js.meth
#
method onmessage : ('self Js.t, 'self messageEvent Js.t) Dom.event_listener Js.writeonly_prop
#
method binaryType : Js.js_string Js.t Js.prop
#
method send : Js.js_string Js.t -> unit Js.meth
#
val webSocket : (Js.js_string Js.t -> webSocket Js.t) Js.constr
#
val webSocket_withProtocol : (Js.js_string Js.t -> Js.js_string Js.t -> webSocket Js.t) Js.constr
#
val webSocket_withProtocols : (Js.js_string Js.t -> Js.js_string Js.t Js.js_array Js.t -> webSocket Js.t) Js.constr
#
val is_supported : unit -> bool
end