From 2bdf11d32a5e19e6e4aca0da0b0334c6ed656742 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Thu, 1 Aug 2024 00:09:43 -0700 Subject: [PATCH] add a note about mutation in `Wsd.t` --- lib/httpun_ws.mli | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/httpun_ws.mli b/lib/httpun_ws.mli index 07a0a4a4..54f7a220 100644 --- a/lib/httpun_ws.mli +++ b/lib/httpun_ws.mli @@ -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 @@ -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