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
type error = [
  1. | `Exn of exn
]
type mode = [
  1. | `Client of unit -> int32
  2. | `Server
]
type t = {
  1. faraday : Faraday.t;
  2. mutable bytes_sent : int;
  3. mode : mode;
  4. mutable wakeup : Optional_thunk.t;
  5. error_handler : error_handler;
  6. mutable error_code : [ `Ok | error ];
}
and error_handler = t -> error -> unit
val default_ready_to_write : unit -> unit
val create : error_handler:error_handler -> mode -> t
val mask : t -> int32 option
val is_closed : t -> bool
val on_wakeup : t -> (unit -> unit) -> unit
val wakeup : t -> unit
val schedule : t -> kind:[< Websocket.Opcode.t ] -> Bigstringaf.t -> off:int -> len:int -> unit
val send_bytes : t -> kind:[< Websocket.Opcode.t ] -> Stdlib.Bytes.t -> off:int -> len:int -> unit
val send_ping : t -> unit
val send_pong : t -> unit
val flushed : t -> (unit -> unit) -> unit
val close : ?code: [< `Abnormal_closure | `Going_away | `Internal_server_error | `Invalid_frame_payload_data | `Mandatory_ext | `Message_too_big | `No_status_rcvd | `Normal_closure | `Other of int | `Policy_violation | `Protocol_error | `TLS_handshake | `Unsupported_data ] -> t -> unit
val error_code : t -> [> `Exn of exn ] option
val report_error : t -> error -> unit
val next : t -> [> `Close of int | `Write of Faraday.bigstring Faraday.iovec list | `Yield ]
val report_result : t -> [< `Closed | `Ok of int ] -> unit
OCaml

Innovation. Community. Security.