package websocketaf

  1. Overview
  2. Docs

Module Websocketaf.Client_connetionSource

Sourcemodule IOVec = Httpaf.IOVec
Sourcetype t
Sourcetype error = [
  1. | Httpaf.Client_connection.error
  2. | `Handshake_failure of Httpaf.Response.t * [ `read ] Httpaf.Body.t
]
Sourcetype input_handlers = {
  1. frame : opcode:Websocket.Opcode.t -> is_fin:bool -> Bigstringaf.t -> off:int -> len:int -> unit;
  2. eof : unit -> unit;
}
Sourceval create : nonce:string -> host:string -> port:int -> resource:string -> sha1:(string -> string) -> error_handler:(error -> unit) -> websocket_handler:(Wsd.t -> input_handlers) -> t
Sourceval next_read_operation : t -> [ `Read | `Close ]
Sourceval next_write_operation : t -> [ `Write of Bigstringaf.t IOVec.t list | `Yield | `Close of int ]
Sourceval read : t -> Bigstringaf.t -> off:int -> len:int -> int
Sourceval read_eof : t -> Bigstringaf.t -> off:int -> len:int -> int
Sourceval report_write_result : t -> [ `Ok of int | `Closed ] -> unit
Sourceval yield_writer : t -> (unit -> unit) -> unit
Sourceval close : t -> unit