Crate humphrey_ws
source · [−]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
Provides asynchronous WebSocket functionality.
Provides error handling for the WebSocket crate.
Provides a Humphrey-compatible WebSocket handler for performing the handshake.
Provides an abstraction over WebSocket frames called Message
.
Provides heartbeat (ping/pong) configuration utilities.
Provides the Restion
type, a combination of Result
and Option
.
Provides functionality for working with a WebSocket stream.