Skip to content

Commit

Permalink
Update web_socket.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Feb 12, 2024
1 parent 896c866 commit 6c43b95
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkgs/web_socket/lib/src/web_socket.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down

0 comments on commit 6c43b95

Please sign in to comment.