From 95e23ee155e5872bea1ba42588ee8ccf4fa468c9 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Mon, 7 Dec 2020 12:00:23 -0800 Subject: [PATCH] README: add note about streaming and ws_stream_tungstenite --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 1bf68a4..fe741fe 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,17 @@ integration with various other crates can be enabled via feature flags * `gio-runtime`: Enables the `gio` module, which provides integration with the [gio](https://gtk-rs.org) runtime. +## Messages vs Streaming + +WebSocket provides a message-oriented protocol, and this crate supports sending +and receiving data in messages; protocols built on WebSocket are allowed to +make message boundaries semantically significant. However, some users of +WebSocket may want to treat the socket as a continuous stream of bytes. If you +know the sending end does not place significance on message boundaries, and you +want to process a stream of bytes without regard to those boundaries, try +[`ws_stream_tungstenite`](https://crates.io/crates/ws_stream_tungstenite), +which builds upon this crate. + ## tokio-tungstenite Originally this crate was created as a fork of