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`.