From 6c43b9561186b589b143810f9ffff502276ef9e1 Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Mon, 12 Feb 2024 15:51:41 -0800 Subject: [PATCH] Update web_socket.dart --- pkgs/web_socket/lib/src/web_socket.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/web_socket/lib/src/web_socket.dart b/pkgs/web_socket/lib/src/web_socket.dart index f712957fa2..ffc0a3844c 100644 --- a/pkgs/web_socket/lib/src/web_socket.dart +++ b/pkgs/web_socket/lib/src/web_socket.dart @@ -91,12 +91,18 @@ abstract interface class WebSocket { /// /// Throws [WebSocketConnectionClosed] if the [WebSocket] is /// closed (either through [close] or by the peer). + /// + /// Data sent through [sendText] will be silently discarded if the peer is + /// disconnected but the disconnect has not yet been detected. void sendText(String s); /// Sends binary data to the connected peer. /// /// Throws [WebSocketConnectionClosed] if the [WebSocket] is /// closed (either through [close] or by the peer). + /// + /// Data sent through [sendBytes] will be silently discarded if the peer is + /// disconnected but the disconnect has not yet been detected. void sendBytes(Uint8List b); /// Closes the WebSocket connection and the [events] `Stream`.