Asynchronous WebSockets for Tokio stack.
Add this in your
[dependencies] tokio-tungstenite = "*"
Take a look at the
examples/ directory for client and server examples. You may also want to get familiar with
Tokio if you don't have any experience with it.
This crate is based on
tungstenite-rs Rust WebSocket library and provides
Tokio bindings and wrappers for it, so you
can use it with non-blocking/asynchronous
TcpStreams from and couple it together with other crates from
tungstenite-rs TLS is supported on all platforms using
rustls through the
rustls-tls feature flags. Neither is enabled by default. If you require support for secure WebSockets (
wss://) enable one of them.