package dream-httpaf

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Httpaf = Dream_httpaf_.Httpaf
module Hpack = Dream_hpack.Hpack
module AB = Angstrom.Buffered
module Reader = Parse.Reader
module Writer = Serialize.Writer
module StreamsTbl = Scheduler.StreamsTbl
module Scheduler : sig ... end
module Queue : sig ... end
type error = Respd.error
type trailers_handler = Headers.t -> unit
type response_handler = Response.t -> Body.Reader.t -> unit
type error_handler = error -> unit
type t = {
  1. mutable settings : Settings.t;
  2. reader : Reader.frame;
  3. writer : Writer.t;
  4. config : Config.t;
  5. streams : Scheduler.t;
  6. mutable current_stream_id : Stream_identifier.t;
  7. mutable max_pushed_stream_id : Stream_identifier.t;
  8. mutable current_server_streams : int;
  9. mutable receiving_headers_for_stream : Stream_identifier.t option;
  10. mutable did_send_go_away : bool;
  11. mutable unacked_settings : int;
  12. pending_pings : ((unit, [ `EOF ]) Stdlib.result -> unit) Queue.t;
  13. error_handler : error -> unit;
  14. push_handler : Request.t -> (response_handler, unit) Stdlib.result;
  15. hpack_encoder : Hpack.Encoder.t;
  16. hpack_decoder : Hpack.Decoder.t;
}
val default_push_handler : Request.t -> (Response.t -> Body.Reader.t -> unit, 'a) Stdlib.result
val is_closed : t -> bool
val shutdown_reader : t -> unit
val flush_request_body : t -> unit
val shutdown_writer : t -> unit
val was_closed_or_implicitly_closed : t -> Stdlib.Int32.t -> bool
val report_error : t -> Error.t -> unit
val report_connection_error : t -> ?reason:string -> Error_code.t -> unit
val report_stream_error : t -> Stream_identifier.t -> Error_code.t -> unit
val shutdown : t -> unit
val set_error_and_handle : t -> Respd.t -> Respd.error -> Error_code.t -> unit
val report_exn : t -> exn -> unit
val send_window_update : 'a. t -> 'a Scheduler.PriorityTreeNode.node -> int32 -> unit
val handle_push_promise_headers : t -> ((('a, 'b Stream.remote_state) Stream.active_state, Respd.active_request, 'c) Stream.state, 'd, 'e) Stream.t -> Headers.t -> unit
val handle_response_headers : t -> Scheduler.nonroot Scheduler.node -> end_stream:bool -> Respd.active_request -> Headers.header list -> unit
val handle_headers : t -> end_stream:bool -> Scheduler.nonroot Scheduler.node -> Headers.t -> unit
val handle_headers_block : t -> ?is_trailers:bool -> Scheduler.nonroot Scheduler.node -> Stream.partial_headers -> int -> Angstrom.bigstring -> unit
val handle_trailer_headers : t -> Scheduler.nonroot Scheduler.node -> Stream.partial_headers -> int -> Angstrom.bigstring -> unit
val create_partial_headers : t -> int -> Bigstringaf.t -> Stream.partial_headers
val handle_first_response_bytes : t -> Scheduler.nonroot Scheduler.node -> Respd.active_request -> Frame.frame_header -> Bigstringaf.t -> unit
val process_trailer_headers : t -> Scheduler.nonroot Scheduler.node -> Respd.response_info -> Frame.frame_header -> Angstrom.bigstring -> unit
val process_headers_frame : t -> Frame.t -> Bigstringaf.t -> unit
val process_data_frame : t -> Frame.t -> Bigstringaf.t -> unit
val on_close_stream : t -> Stream_identifier.t -> active:bool -> Stream.closed -> unit
val process_priority_frame : t -> Frame.t -> Priority.t -> unit
val process_rst_stream_frame : t -> Frame.t -> Error_code.t -> unit
val process_settings_frame : t -> Frame.t -> Settings.setting list -> unit
val reserve_stream : t -> Frame.t -> Stream_identifier.t -> Bigstringaf.t -> unit
val process_push_promise_frame : t -> Frame.t -> Stdlib.Int32.t -> Bigstringaf.t -> unit
val ok : (unit, 'a) Stdlib.result
val process_ping_frame : t -> Frame.t -> Faraday.bigstring -> unit
val process_goaway_frame : t -> 'a -> last_stream_id:'b -> data:Bigstringaf.t -> Error_code.t -> unit
val add_window_increment : 'a. t -> 'a Scheduler.PriorityTreeNode.node -> int32 -> unit
val process_window_update_frame : t -> Frame.t -> int32 -> unit
val process_continuation_frame : t -> Frame.t -> Angstrom.bigstring -> unit
val create : ?config:Config.t -> ?push_handler:(Request.t -> (response_handler, unit) Stdlib.result) -> error_handler:(error -> unit) -> unit -> t
val create_h2c : ?config:Config.t -> ?push_handler:(Request.t -> (response_handler, unit) Stdlib.result) -> http_request:Httpaf.Request.t -> error_handler:(error -> unit) -> (Respd.response_handler * Respd.error_handler) -> (t, string) Stdlib.result
val request : t -> ?flush_headers_immediately:bool -> ?trailers_handler:Respd.trailers_handler -> Request.t -> error_handler:Respd.error_handler -> response_handler:Respd.response_handler -> Body.Writer.t
val ping : t -> ?payload:Bigstringaf.t -> ?off:int -> ((unit, [ `EOF ]) Stdlib.result -> unit) -> unit
val next_read_operation : t -> [> `Close | `Read ]
val read : t -> Bigstringaf.t -> off:int -> len:int -> int
val unexpected_eof : t -> unit
val read_eof : t -> Bigstringaf.t -> off:int -> len:int -> int
val yield_reader : 'a -> (unit -> 'b) -> 'b
val next_write_operation : t -> [> `Close of int | `Write of Faraday.bigstring Faraday.iovec list | `Yield ]
val yield_writer : t -> (unit -> unit) -> unit
val report_write_result : t -> [< `Closed | `Ok of int ] -> unit
OCaml

Innovation. Community. Security.