Skip to content

Commit

Permalink
add a note about mutation in Wsd.t
Browse files Browse the repository at this point in the history
  • Loading branch information
anmonteiro committed Aug 1, 2024
1 parent 3492a4a commit 2bdf11d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/httpun_ws.mli
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ module Wsd : sig
-> len:int
-> unit
(** [is_fin] defaults to [true]. Set to `false` if sending multiple frames,
except on the last one. *)
except on the last one.
{b NOTE}: this function mutates the bigarray on clients due to the
WebSocket protocol masking requirements. *)

val send_bytes
: t
Expand All @@ -109,7 +111,9 @@ module Wsd : sig
-> len:int
-> unit
(** [is_fin] defaults to [true]. Set to `false` if sending multiple frames,
except on the last one. *)
except on the last one.
{b NOTE}: this function mutates the `bytes` argument on clients due to
the WebSocket protocol masking requirements. *)

val send_ping : ?application_data:Bigstringaf.t IOVec.t -> t -> unit
val send_pong : ?application_data:Bigstringaf.t IOVec.t -> t -> unit
Expand Down

0 comments on commit 2bdf11d

Please sign in to comment.