#websocket #io #web

tokio-tungstenite

Tokio binding for Tungstenite, the Lightweight stream-based WebSocket implementation

13 releases (8 breaking)

✓ Uses Rust 2018 edition

0.10.1 Jan 31, 2020
0.9.0 Aug 8, 2019
0.8.0 May 17, 2019
0.6.0 Aug 22, 2018
0.1.0 Mar 17, 2017

#9 in WebSocket

Download history 1391/week @ 2019-12-17 492/week @ 2019-12-24 643/week @ 2019-12-31 1355/week @ 2020-01-07 1433/week @ 2020-01-14 601/week @ 2020-01-21 981/week @ 2020-01-28 1830/week @ 2020-02-04 2021/week @ 2020-02-11 1736/week @ 2020-02-18 2350/week @ 2020-02-25 6072/week @ 2020-03-03 10282/week @ 2020-03-10 12033/week @ 2020-03-17 12550/week @ 2020-03-24 11222/week @ 2020-03-31

4,883 downloads per month
Used in 43 crates (32 directly)

MIT license

35KB
764 lines

tokio-tungstenite

Asynchronous WebSockets for Tokio stack.

MIT licensed Crates.io Build Status

Documentation

Usage

Add this in your Cargo.toml:

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

What is tokio-tungstenite?

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 Tokio stack.

Dependencies

~6.5MB
~141K SLoC