actix-ws
WebSockets for Actix Web, without actors.
Example
use ;
use Message;
async
async
Typed Messages (Optional)
Enable the serde-json feature to send/receive typed messages using serde_json.
See examples/json.rs and run it with:
WebSocket Sub-Protocols
Use handle_with_protocols when your server supports one or more
Sec-WebSocket-Protocol values.
let = handle_with_protocols?;
When there is an overlap, the first protocol offered by the client that the server supports is returned in the handshake response.
Resources
- API Documentation
- Example Chat Project
- Minimum Supported Rust Version (MSRV): 1.88
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.