#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

#6 in WebSocket

Download history 1183/week @ 2019-11-08 1053/week @ 2019-11-15 1283/week @ 2019-11-22 1199/week @ 2019-11-29 1994/week @ 2019-12-06 1783/week @ 2019-12-13 705/week @ 2019-12-20 547/week @ 2019-12-27 1172/week @ 2020-01-03 1467/week @ 2020-01-10 832/week @ 2020-01-17 736/week @ 2020-01-24 1272/week @ 2020-01-31 2121/week @ 2020-02-07 1856/week @ 2020-02-14

4,883 downloads per month
Used in 35 crates (25 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
~142K SLoC