package sonet

  1. Overview
  2. Docs
type state
val num_bytes_parsed : state -> int64
type payload_type =
  1. | No_payload
  2. | Payload of state
  3. | Error of string
val init_from_response : ?payload_callback:payload_callback -> ?max_payload_length:int64 -> Response_header.t -> payload_type
val init_from_request : ?payload_callback:payload_callback -> ?max_payload_length:int64 -> Request_header.t -> payload_type
type error
val string_of_error : error -> string
exception Http_error of error
type t = {
  1. content : Buffer.t;
  2. trailers : header_fields;
}
type parse_result =
  1. | Result of t * int
  2. | Parse_incomplete of state
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_of_request : Request_header.t -> Buffer.t -> t -> unit
val serialize_of_response : Response_header.t -> Buffer.t -> t -> unit
OCaml

Innovation. Community. Security.