package sonet

  1. Overview
  2. Docs
type state
type header_callback = Request_header.t -> Request_header.t
val init_state : ?header_callback:header_callback -> ?payload_callback:payload_callback -> unit -> state
val num_bytes_parsed : state -> int64
type error
val string_of_error : error -> string
exception Http_error of error
type t = {
  1. request : Request_header.t;
  2. payload : Payload.t option;
}
type parse_result =
  1. | Result of t * int
  2. | Parse_incomplete of state
  3. | Error of string
val parse : state -> string -> parse_result
val parse_substring : state -> string -> int -> int -> parse_result
val get_parse_result : state -> t option
val connection_closed : state -> unit
val serialize : Buffer.t -> t -> unit
OCaml

Innovation. Community. Security.