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;
pub 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::*;
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 native_client
and non-target_family="wasm"
andclient
- Implementation of
ClientConnector
for tokio runtimes. - Close
Frame - Message
Signal - Signal that listens to the current
MessageStatus
of 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.