package dream-httpaf

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Dream_httpaf_.Server_connectionSource

Sourcemodule Reader = Parse.Reader
Sourcemodule Writer = Serialize.Writer
Sourcetype request_handler = Reqd.t -> unit
Sourcetype error = [
  1. | `Bad_gateway
  2. | `Bad_request
  3. | `Internal_server_error
  4. | `Exn of exn
]
Sourcetype error_handler = ?request:Request.t -> error -> (Headers.t -> Body.Writer.t) -> unit
Sourcetype error_code =
  1. | No_error
  2. | Error of {
    1. request : Request.t option;
    2. mutable response_state : Response_state.t;
    }
Sourcetype t = {
  1. reader : Reader.request;
  2. writer : Writer.t;
  3. response_body_buffer : Bigstringaf.t;
  4. request_handler : request_handler;
  5. error_handler : error_handler;
  6. request_queue : Reqd.t Queue.t;
  7. mutable error_code : error_code;
}
Sourceval is_closed : t -> bool
Sourceval is_active : t -> bool
Sourceval current_reqd_exn : t -> Reqd.t
Sourceval yield_reader : t -> (unit -> unit) -> unit
Sourceval wakeup_reader : t -> unit
Sourceval yield_writer : t -> (unit -> unit) -> unit
Sourceval wakeup_writer : t -> unit
Sourceval default_error_handler : ?request:'a -> [< `Bad_gateway | `Bad_request | `Conflict | `Enhance_your_calm | `Exn of exn | `Expectation_failed | `Forbidden | `Gateway_timeout | `Gone | `Http_version_not_supported | `I_m_a_teapot | `Internal_server_error | `Length_required | `Method_not_allowed | `Network_authentication_required | `Not_acceptable | `Not_found | `Not_implemented | `Payload_too_large | `Payment_required | `Precondition_failed | `Precondition_required | `Proxy_authentication_required | `Range_not_satisfiable | `Request_header_fields_too_large | `Request_timeout | `Service_unavailable | `Too_many_requests | `Unauthorized | `Unsupported_media_type | `Upgrade_required | `Uri_too_long ] -> (Headers.t -> Body.Writer.t) -> unit
Sourceval create : ?config:Config.t -> ?error_handler:Reqd.error_handler -> request_handler -> t
Sourceval shutdown_reader : t -> unit
Sourceval shutdown_writer : t -> unit
Sourceval error_code : t -> [> `Bad_gateway | `Bad_request | `Exn of exn | `Internal_server_error ] option
Sourceval shutdown : t -> unit
Sourceval set_error_and_handle : ?request:Request.t -> t -> Reqd.error -> unit
Sourceval report_exn : t -> exn -> unit
Sourceval advance_request_queue : t -> unit
Sourceval _next_read_operation : t -> [> `Close | `Error of Reader.request_error | `Read | `Start | `Yield ]
Sourceval _final_read_operation_for : t -> Reqd.t -> [> `Close | `Error of Reader.request_error | `Read | `Start | `Yield ]
Sourceval next_read_operation : t -> [> `Close | `Read | `Yield ]
Sourceval read_with_more : t -> Bigstringaf.t -> off:int -> len:int -> Reader.AU.more -> int
Sourceval read : t -> Bigstringaf.t -> off:int -> len:int -> int
Sourceval read_eof : t -> Bigstringaf.t -> off:int -> len:int -> int
Sourceval flush_response_error_body : Response_state.t -> unit
Sourceval _next_write_operation : t -> [> `Close of int | `Write of Faraday.bigstring Faraday.iovec list | `Yield ]
Sourceval _final_write_operation_for : t -> Reqd.t -> [> `Close of int | `Write of Faraday.bigstring Faraday.iovec list | `Yield ]
Sourceval next_write_operation : t -> [> `Close of int | `Write of Faraday.bigstring Faraday.iovec list | `Yield ]
Sourceval report_write_result : t -> [< `Closed | `Ok of int ] -> unit
OCaml

Innovation. Community. Security.