package async_websocket

  1. Overview
  2. Docs
type t = {
  1. opcode : Opcode.t;
  2. final : bool;
  3. content : string;
}
val sexp_of_t : t -> Sexplib0.Sexp.t
include Ppx_quickcheck_runtime.Quickcheckable.S with type t := t
val quickcheck_generator : t Base_quickcheck.Generator.t
val quickcheck_observer : t Base_quickcheck.Observer.t
val quickcheck_shrinker : t Base_quickcheck.Shrinker.t
include Ppx_compare_lib.Equal.S with type t := t
val equal : t -> t -> bool
module Error : sig ... end
val write_frame : masked:bool -> Async.Writer.t -> t -> unit
val create : opcode:Opcode.t -> ?final:bool -> string -> t
val create_close : code:int -> ?final:bool -> string -> t
val frame_bytes : content_len:int -> masked:bool -> int

frame_bytes calculates how many bytes a websocket frame would consume.

val max_content_bytes : max_frame_bytes:int -> masked:bool -> int

max_content_bytes calculates the most content that can be contained in the payload of a frame with up to max_frame_bytes.

module Iobuf_writer : sig ... end
module Frame_reader : sig ... end
OCaml

Innovation. Community. Security.