package dream-httpaf

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Reader = Parse.Reader
module Writer = Serialize.Writer
type error = [
  1. | `Malformed_response of string
  2. | `Invalid_response_body_length of Response.t
  3. | `Exn of exn
]
type response_handler = Response.t -> Body.Reader.t -> unit
type error_handler = error -> unit
type t = {
  1. config : Config.t;
  2. reader : Reader.response;
  3. writer : Writer.t;
  4. request_queue : Respd.t Queue.t;
}
val is_closed : t -> bool
val is_waiting : t -> bool
val is_active : t -> bool
val current_respd_exn : t -> Respd.t
val yield_reader : t -> (unit -> unit) -> unit
val wakeup_reader : t -> unit
val yield_writer : t -> (unit -> unit) -> unit
val wakeup_writer : t -> unit
val create : ?config:Config.t -> unit -> t
val create_request_body : request:Request.t -> t -> Body.Writer.t
val request : t -> ?flush_headers_immediately:bool -> Request.t -> error_handler:(Respd.error -> unit) -> response_handler:(Response.t -> Body.Reader.t -> unit) -> Body.Writer.t
val shutdown_reader : t -> unit
val shutdown_writer : t -> unit
val shutdown : t -> unit
val set_error_and_handle : t -> Respd.error -> unit
val unexpected_eof : t -> unit
val report_exn : t -> exn -> unit
exception Local
val maybe_pipeline_queued_requests : t -> unit
val advance_request_queue : t -> unit
val _next_read_operation : t -> [> `Close | `Error of Reader.response_error | `Read | `Start | `Yield ]
val _final_read_operation_for : t -> Respd.t -> [> `Close | `Error of Reader.response_error | `Read | `Start | `Yield ]
val next_read_operation : t -> [> `Close | `Read | `Yield ]
val read_with_more : t -> Bigstringaf.t -> off:int -> len:int -> Reader.AU.more -> int
val read : t -> Bigstringaf.t -> off:int -> len:int -> int
val read_eof : t -> Bigstringaf.t -> off:int -> len:int -> int
val _next_write_operation : t -> [> `Close of int | `Write of Faraday.bigstring Faraday.iovec list | `Yield ]
val _final_write_operation_for : t -> Respd.t -> [> `Close of int | `Write of Faraday.bigstring Faraday.iovec list | `Yield ]
val next_write_operation : t -> [> `Close of int | `Write of Faraday.bigstring Faraday.iovec list | `Yield ]
val report_write_result : t -> [< `Closed | `Ok of int ] -> unit
OCaml

Innovation. Community. Security.