package dream-httpaf

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Gluten = Dream_gluten.Gluten
module Httpaf = Dream_httpaf_.Httpaf
module IOVec = Httpaf.IOVec
module Server_handshake = Gluten.Server
type state =
  1. | Handshake of Server_handshake.t
  2. | Websocket of Websocket_connection.t
type t = {
  1. mutable state : state;
  2. websocket_handler : Wsd.t -> Websocket_connection.input_handlers;
}
val is_closed : t -> bool
val create : sha1:(string -> string) -> ?error_handler:Wsd.error_handler -> (Wsd.t -> Websocket_connection.input_handlers) -> t
val create_websocket : ?error_handler:Wsd.error_handler -> (Wsd.t -> Websocket_connection.input_handlers) -> t
val shutdown : t -> unit
val report_exn : t -> exn -> unit
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 yield_reader : t -> (unit -> unit) -> unit
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 yield_writer : t -> (unit -> unit) -> unit
OCaml

Innovation. Community. Security.