package dream
Module Websocketaf.Client_connectionSource
Source
type error = [ | Httpaf.Client_connection.error| `Handshake_failure of Httpaf.Response.t * [ `read ] Httpaf.Body.t
]Source
type input_handlers = {frame : opcode:Websocket.Opcode.t -> is_fin:bool -> Bigstringaf.t -> off:int -> len:int -> unit;eof : unit -> unit;
}Source
val connect :
nonce:string ->
?headers:Httpaf.Headers.t ->
sha1:(string -> string) ->
error_handler:(error -> unit) ->
websocket_handler:(Wsd.t -> input_handlers) ->
string ->
tSource
val create :
?error_handler:(Wsd.t -> [ `Exn of exn ] -> unit) ->
(Wsd.t -> input_handlers) ->
tSource
val next_write_operation :
t ->
[ `Write of Bigstringaf.t IOVec.t list | `Yield | `Close of int ]