package dream-httpaf

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Httpaf = Dream_httpaf_.Httpaf
module Headers = Httpaf.Headers
type state =
  1. | Handshake of Client_handshake.t
  2. | Websocket of Websocket_connection.t
type t = {
  1. mutable state : state;
}
type error = [
  1. | Httpaf.Client_connection.error
  2. | `Handshake_failure of Httpaf.Response.t * Httpaf.Body.Reader.t
]
val passes_scrutiny : status:[> `Switching_protocols ] -> accept:Stdlib.String.t -> Headers.t -> bool
val handshake_exn : t -> Client_handshake.t
val connect : nonce:string -> ?headers:Httpaf.Headers.t -> sha1:(string -> string) -> error_handler: ([> `Exn of exn | `Handshake_failure of Httpaf.Response.t * Httpaf.Body.Reader.t | `Invalid_response_body_length of Dream_httpaf___Httpaf.Response.t | `Malformed_response of string ] -> unit) -> websocket_handler:(Wsd.t -> Websocket_connection.input_handlers) -> string -> t
val create : ?error_handler:Wsd.error_handler -> (Wsd.t -> Websocket_connection.input_handlers) -> t
val next_read_operation : t -> [ `Close | `Read | `Yield ]
val read : t -> Bigstringaf.t -> off:int -> len:int -> int
val read_eof : t -> Bigstringaf.t -> off:int -> len:int -> int
val next_write_operation : t -> [ `Close of int | `Write of Bigstringaf.t Faraday.iovec list | `Yield ]
val report_write_result : t -> [ `Closed | `Ok of int ] -> unit
val report_exn : t -> exn -> unit
val yield_reader : t -> (unit -> unit) -> unit
val yield_writer : t -> (unit -> unit) -> unit
val is_closed : t -> bool
val shutdown : t -> unit
OCaml

Innovation. Community. Security.