package dream-httpaf

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

Module Dream_h2.ReqdSource

Sourcemodule Writer = Serialize.Writer
Sourcetype error = [
  1. | `Bad_request
  2. | `Internal_server_error
  3. | `Exn of exn
]
Sourcetype error_handler = ?request:Request.t -> error -> (Headers.t -> Body.Writer.t) -> unit
Sourcetype response_state =
  1. | Waiting
  2. | Fixed of {
    1. response : Response.t;
    2. mutable iovec : [ `String of string | `Bigstring of Bigstringaf.t ] Httpaf.IOVec.t;
    }
  3. | Streaming of {
    1. response : Response.t;
    2. response_body : Body.Writer.t;
    3. trailers : Headers.t;
    }
  4. | Complete of Response.t
Sourcetype request_info = {
  1. request : Request.t;
  2. request_body : Body.Reader.t;
  3. mutable request_body_bytes : int64;
}
Sourcetype active_stream = {
  1. body_buffer_size : int;
  2. encoder : Dream_h2.Stream.Hpack.Encoder.t;
  3. mutable response_state : response_state;
  4. mutable trailers_parser : Stream.partial_headers option;
  5. mutable trailers : Headers.t option;
  6. create_push_stream : Stream_identifier.t -> (t, [ `Push_disabled | `Stream_ids_exhausted ]) result;
}
Sourceval create_active_request : Request.t -> Body.Reader.t -> request_info
Sourceval create_active_stream : Dream_h2.Stream.Hpack.Encoder.t -> int -> (Stream_identifier.t -> (t, [ `Push_disabled | `Stream_ids_exhausted ]) result) -> active_stream
Sourceval response : ((('a, 'b) Stream.active_state, active_stream, 'c * active_stream) Stream.state, 'd, 'e) Stream.stream -> Response.t option
Sourceval send_fixed_response : ((('a, 'b) Stream.active_state, 'c, 'd) Stream.state, 'e, 'f) Stream.stream -> active_stream -> Response.t -> [< `Bigstring of Bigstringaf.t | `String of string ] -> unit
Sourceval schedule_trailers : ((('a, 'b) Stream.active_state, active_stream, 'c) Stream.state, 'd, 'e) Stream.stream -> Headers.t -> unit
Sourceval unsafe_respond_with_data : ((('a, 'b) Stream.active_state, active_stream, 'b * active_stream) Stream.state, 'c, 'd) Stream.stream -> Response.t -> [< `Bigstring of Bigstringaf.t | `String of string ] -> unit
Sourceval respond_with_string : ((('a, 'b) Stream.active_state, active_stream, 'b * active_stream) Stream.state, 'c, 'd) Stream.stream -> Response.t -> string -> unit
Sourceval respond_with_bigstring : ((('a, 'b) Stream.active_state, active_stream, 'b * active_stream) Stream.state, 'c, 'd) Stream.stream -> Response.t -> Bigstringaf.t -> unit
Sourceval send_streaming_response : flush_headers_immediately:bool -> ((('a, 'b) Stream.active_state, 'c, 'd) Stream.state, 'e, 'f) Stream.stream -> active_stream -> Response.t -> Body.Writer.t
Sourceval unsafe_respond_with_streaming : ((('a, 'b) Stream.active_state, active_stream, 'b * active_stream) Stream.state, 'c, 'd) Stream.stream -> flush_headers_immediately:bool -> Response.t -> Body.Writer.t
Sourceval respond_with_streaming : ((('a, 'b) Stream.active_state, active_stream, 'b * active_stream) Stream.state, 'c, 'd) Stream.stream -> ?flush_headers_immediately:bool -> Response.t -> Body.Writer.t
Sourceval start_push_stream : ((('a, 'b) Stream.active_state, 'c, 'd) Stream.state, 'e, 'f) Stream.stream -> active_stream -> Request.t -> (t, [ `Push_disabled | `Stream_cant_push | `Stream_ids_exhausted ]) result
Sourceval unsafe_push : ((('a, 'b) Stream.active_state, active_stream, 'c) Stream.state, 'd, 'e) Stream.stream -> Request.t -> (t, [ `Push_disabled | `Stream_cant_push | `Stream_ids_exhausted ]) result
Sourceval push : ((('a, 'b) Stream.active_state, active_stream, 'c) Stream.state, 'd, 'e) Stream.stream -> Request.t -> (t, [ `Push_disabled | `Stream_cant_push | `Stream_ids_exhausted ]) result
Sourceval _report_error : ?request:Request.t -> t -> active_stream -> error -> Error_code.t -> unit
Sourceval error_code : ((('a, 'b) Stream.active_state, 'c, 'd) Stream.state, [> `Exn of exn ] as 'e, 'f) Stream.stream -> 'e option
Sourceval requires_output : ((('a, 'b) Stream.active_state, active_stream, 'c) Stream.state, 'd, 'e) Stream.stream -> bool
Sourceval write_buffer_data : Dream_h2.Stream.Writer.t -> off:int -> len:int -> Dream_h2__Serialize.frame_info -> [< `Bigstring of Bigstringaf.t | `String of string ] -> unit
Sourceval close_stream : ((('a, 'b) Stream.active_state, 'c, 'd) Stream.state, 'e, 'f) Stream.stream -> unit
Sourceval flush_response_body : ((('a, 'b) Stream.active_state, active_stream, 'c) Stream.state, 'd, 'e) Stream.stream -> max_bytes:int -> int
Sourceval deliver_trailer_headers : ((('a, 'b) Stream.active_state, active_stream, 'c) Stream.state, 'd, 'e) Stream.stream -> Headers.t -> unit
OCaml

Innovation. Community. Security.