package dream-httpaf

  1. Overview
  2. Docs
Internal: shared http/af stack for Dream (server) and Hyper (client)

Install

Dune Dependency

Authors

Maintainers

Sources

dream-1.0.0-alpha3.tar.gz
sha256=f289253109aee39ab912f9f38aa5e7b44e0b4b01fd7d3dd5c407b034c57f01bc
md5=148588e6f584cd9f2438e56da7df2f56

doc/dream-httpaf.websocketaf/Websocketaf/Client_connection/index.html

Module Websocketaf.Client_connectionSource

Sourcetype t
Sourcetype input_handlers = {
  1. frame : opcode:Websocket.Opcode.t -> is_fin:bool -> len:int -> Payload.t -> unit;
  2. eof : unit -> unit;
}
Sourceval connect : nonce:string -> ?headers:Httpaf.Headers.t -> sha1:(string -> string) -> error_handler:(error -> unit) -> websocket_handler:(Wsd.t -> input_handlers) -> string -> t
Sourceval create : ?error_handler:(Wsd.t -> [ `Exn of exn ] -> unit) -> (Wsd.t -> input_handlers) -> t
Sourceval next_read_operation : t -> [ `Read | `Yield | `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 yield_reader : t -> (unit -> unit) -> unit
Sourceval report_write_result : t -> [ `Ok of int | `Closed ] -> unit
Sourceval yield_writer : t -> (unit -> unit) -> unit
Sourceval report_exn : t -> exn -> unit
Sourceval is_closed : t -> bool
Sourceval shutdown : t -> unit
OCaml

Innovation. Community. Security.