dream-httpaf.dream-h2
Parse.Reader
dream-httpaf
dream-httpaf.dream-gluten
dream-httpaf.dream-gluten-lwt
dream-httpaf.dream-gluten-lwt-unix
dream-httpaf.dream-h2-lwt
dream-httpaf.dream-h2-lwt-unix
dream-httpaf.dream-hpack
dream-httpaf.dream-httpaf_
dream-httpaf.dream-httpaf_-lwt
dream-httpaf.dream-httpaf_-lwt-unix
dream-httpaf.dream-websocketaf
dream-httpaf.dream-websocketaf-lwt
dream-httpaf.dream-websocketaf-lwt-unix
module AU = Angstrom.Unbuffered
type parse_error = [
| `Parse of string list * string
| `Error of Error.t
| `Error_code of Error_code.t
]
type 'error parse_state =
| Initial
| Fail of 'error
| Partial of Bigstringaf.t -> off:int -> len:int -> AU.more -> (unit, 'error) result AU.state
type 'error t = {
parser : (unit, 'error) result Angstrom.t;
mutable parse_state : 'error parse_state;
mutable closed : bool;
parse_context : parse_context;
}
type frame = parse_error t
val create : (unit, 'a) result Angstrom.t -> parse_context -> 'a t
val create_parse_context : int -> parse_context
val settings_preface : parse_context -> (Frame.t * Settings.settings_list, [> `Error of Error.t ]) result Angstrom.t
val connection_preface_and_frames : max_frame_size:int -> (parse_context -> ('a * 'b, 'c) result Angstrom.t) -> ('a -> 'b -> 'd) -> ((Frame.t, Error.t) result -> 'e) -> 'c t
val client_frames : (Frame.t -> Settings.settings_list -> 'a) -> ((Frame.t, Error.t) result -> 'b) -> max_frame_size:int -> [> `Error of Error.t ] t
val server_frames : max_frame_size:int -> (Frame.t -> Settings.settings_list -> 'a) -> ((Frame.t, Error.t) result -> 'b) -> [> `Error of Error.t ] t
val is_closed : 'a t -> bool
val transition : ([> `Error_code of Error_code.t | `Parse of string list * string ] as 'a) t -> (unit, 'a) result AU.state -> int
val start : ([> `Parse of string list * string ] as 'a) t -> (unit, 'a) result AU.state -> unit
val read_with_more : [> `Error_code of Error_code.t | `Parse of string list * string ] t -> Bigstringaf.t -> off:int -> len:int -> AU.more -> int
val force_close : 'a t -> unit
val fail_to_string : string list -> string -> string
val next_from_error : 'a t -> ?msg:string -> Error_code.t -> [> `Close | `Error of Error.t | `Read ]
val next : [< `Error of Error.t | `Error_code of Error_code.t | `Parse of string list * string ] t -> [> `Close | `Error of Error.t | `Read ]