Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
module Opcode : sig ... end
module Connection_close_reason : sig ... end
module Frame_reader = Frame.Frame_reader
module Frame : sig ... end
module Iobuf_writer = Frame.Iobuf_writer
module Content_reassembler : sig ... end
Content_reassembler
can process fragmented content from websocket frames and reassemble fragmented content into a contiguous buffer.
module Websocket_role : sig ... end
val create :
?opcode:[ `Text | `Binary ] ->
role:Websocket_role.t ->
Async.Reader.t ->
Async.Writer.t ->
t
val pipes : t -> string Async.Pipe.Reader.t * string Async.Pipe.Writer.t
val transport : t -> Async_rpc_kernel.Rpc.Transport.t
val close_finished :
t ->
(Connection_close_reason.t * string * Core.Info.t option) Async.Deferred.t
val frame_received : t -> (Opcode.t -> unit) Bus.Read_only.t
val send_ping : t -> string -> unit
val monitor_pongs :
?time_source:Async.Time_source.t ->
ping_every:Core.Time_ns.Span.t ->
concerning_pong_response_delay:Core.Time_ns.Span.t ->
on_concerning_pong_response_delay:(unit -> unit) ->
t ->
unit
Listen for pongs frames, and report when it has been too long since the last pong frame. Since pong frames don't typically arrive unsolicited (though it is legal if they do), we send ping frames at the specified interval.