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. mode : mode;
  3. mutable wakeup : Optional_thunk.t;
  4. error_handler : error_handler;
  5. 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 -> ?is_fin:bool -> kind:[< Websocket.Opcode.t ] -> Bigstringaf.t -> off:int -> len:int -> unit
val send_bytes : t -> ?is_fin:bool -> kind:[< Websocket.Opcode.t ] -> Bytes.t -> off:int -> len:int -> unit
val send_ping : ?application_data:Bigstringaf.t IOVec.t -> t -> unit
val send_pong : ?application_data:Bigstringaf.t IOVec.t -> 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.