package ocaml-vdom

  1. Overview
  2. Docs

Module Js_browser.WebSocketSource

Sourcetype t
Sourceval t_of_js : Ojs.t -> t
Sourceval t_to_js : t -> Ojs.t
Sourcetype ready_state =
  1. | Connecting
  2. | Open
  3. | Closing
  4. | Closed
Sourceval create : string -> ?protocols:string list -> unit -> t
Sourceval send : t -> string -> unit
Sourceval close : t -> ?code:int -> ?reason:string -> unit -> unit
Sourceval binary_type : t -> string
Sourceval set_binary_type : t -> string -> unit
Sourceval ready_state : t -> ready_state
Sourceval add_event_listener : t -> Event.kind -> (Event.t -> unit) -> bool -> unit
Sourcemodule CloseEvent : sig ... end