Expand description
Humphrey WebSocket is a crate which extends Humphrey Core with WebSocket support by hooking into the latter’s WebsocketHandler trait. It handles the WebSocket handshake and framing protocol and provides a simple and flexible API for sending and receiving messages. Using Humphrey’s generic Stream type, it supports drop-in TLS. It also has no dependencies in accordance with Humphrey’s goals of being dependency-free.
It provides both synchronous and asynchronous WebSocket functionality.
Learn more about Humphrey WebSocket here.
Re-exports§
pub use handler::async_websocket_handler;pub use handler::websocket_handler;pub use async_app::AsyncStream;pub use async_app::AsyncWebsocketApp;pub use message::Message;pub use stream::WebsocketStream;
Modules§
- async_
app - Provides asynchronous WebSocket functionality.
- error
- Provides error handling for the WebSocket crate.
- handler
- Provides a Humphrey-compatible WebSocket handler for performing the handshake.
- message
- Provides an abstraction over WebSocket frames called
Message. - ping
- Provides heartbeat (ping/pong) configuration utilities.
- restion
- Provides the
Restiontype, a combination ofResultandOption. - stream
- Provides functionality for working with a WebSocket stream.