🔌 trillium-websockets — WebSocket handler
WebSocket handler for Trillium, built on async-tungstenite. Accepts WebSocket upgrade requests and hands each connection to an async handler function or a WebSocketHandler implementation. Optionally supports the json feature for typed JSON message handling via JsonWebSocketHandler.
Example
use StreamExt;
use ;
let app = websocket;
// run with your chosen runtime adapter, e.g.:
// trillium_tokio::run(app);
Safety
This crate uses #![forbid(unsafe_code)].