package dream-httpaf

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Httpaf = Dream_httpaf_.Httpaf
module IOVec = Httpaf.IOVec
module Reader = Parse.Reader
type error = [
  1. | `Exn of exn
]
type error_handler = Wsd.t -> error -> unit
type t = {
  1. reader : [ `Parse of string list * string ] Reader.t;
  2. wsd : Wsd.t;
  3. eof : unit -> unit;
}
type input_handlers = {
  1. frame : opcode:Websocket.Opcode.t -> is_fin:bool -> len:int -> Payload.t -> unit;
  2. eof : unit -> unit;
}
val random_int32 : unit -> Stdlib.Int32.t
val default_error_handler : Wsd.t -> [< `Exn of exn ] -> unit
val create : mode:Wsd.mode -> ?error_handler:Wsd.error_handler -> (Wsd.t -> input_handlers) -> t
val shutdown : t -> unit
val set_error_and_handle : t -> Wsd.error -> unit
val next_read_operation : t -> [> `Close | `Read ]
val next_write_operation : t -> [> `Close of int | `Write of Faraday.bigstring Faraday.iovec list | `Yield ]
val read : t -> Bigstringaf.t -> off:int -> len:int -> int
val read_eof : t -> Bigstringaf.t -> off:int -> len:int -> int
val report_write_result : t -> [< `Closed | `Ok of int ] -> unit
val yield_writer : t -> (unit -> unit) -> unit
val is_closed : t -> bool
val report_exn : t -> exn -> unit
val yield_reader : 'a -> 'b -> unit
OCaml

Innovation. Community. Security.