Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
val create : role:[ `Client of Core.Random.State.t | `Server ] -> t
val required_frame_bytes : t -> content_len:int -> int
val max_content_bytes : t -> max_frame_bytes:int -> int
val start_write :
t ->
(Core.read_write, Iobuf.seek) Iobuf.t ->
opcode:Opcode.t ->
final:bool ->
content_len:int ->
(Core.read_write, Iobuf.seek) Iobuf.t
Starts writing a frame to the given iobuf; and returns a "content window" iobuf pointing to websocket frame's content.
Caller must:
required_frame_bytes
space.content_len
bytes to the content window.finish_write
.val finish_write_exn : t -> unit
Finishes writing a frame to the given iobuf. Raises if the iobuf still has a nonzero length.