Expand description
Creating a WebSocket server or a client in Rust can be troublesome. This crate facilitates this process by providing:
- High-level abstraction of WebSocket, handling Ping/Pong from both Client and Server.
- Traits to allow declarative and event-based programming.
- Automatic reconnection of WebSocket Client.
Refer to client or server module for detailed implementation guides.
Re-exports§
pub use client::connect;native_clientpub use client::connect_with;pub use client::ClientConfig;pub use client::ClientExt;pub use client::Client;pub use server::Server;pub use server::ServerExt;pub use session::Session;pub use session::SessionExt;pub use server_runners::*;axumortungstenite
Modules§
- client
client - Get started
- server
server - WebSocket Server
- server_
runners server - session
server
Structs§
- Bytes
- A cheaply cloneable and sliceable chunk of contiguous memory.
- Client
Connector Tokio - Implementation of
ClientConnectorfor tokio runtimes. - Close
Frame - Message
Signal - Signal that listens to the current
MessageStatusof a submitted message. - Sink
- Socket
- Socket
Config - Socket configuration.
- Stream
- Utf8
Bytes - Re-exported from
tungstenite. Utf8 payload.
Enums§
- Close
Code - Message
- Message
Status - Possible states of a submitted message.
- RawMessage
- WSError
- Possible WebSocket errors.