3 releases
0.1.1 | May 23, 2024 |
---|---|
0.1.0 | Nov 17, 2023 |
0.1.0-rc.4 | Nov 2, 2023 |
#90 in WebSocket
6,977 downloads per month
Used in 4 crates
1MB
14K
SLoC
ws
This crate provides WebSocket support for Rocket via integration with Rocket's [connection upgrades] API.
Usage
-
Depend on
rocket_ws
, renamed here tows
:[dependencies] ws = { package = "rocket_ws", version = "0.1.1" }
-
Use it!
#[get("/echo")] fn echo_stream(ws: ws::WebSocket) -> ws::Stream!['static] { ws::Stream! { ws => for await message in ws { yield message?; } } }
See the crate docs for full details.
Dependencies
~14–45MB
~777K SLoC