Crate ezsockets

Source
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§

clientclient
Get started
serverserver
WebSocket Server
server_runnersserver
sessionserver

Structs§

Bytes
A cheaply cloneable and sliceable chunk of contiguous memory.
ClientConnectorTokionative_client and non-target_family="wasm" and client
Implementation of ClientConnector for tokio runtimes.
CloseFrame
MessageSignal
Signal that listens to the current MessageStatus of a submitted message.
Sink
Socket
SocketConfig
Socket configuration.
Stream
Utf8Bytes
Re-exported from tungstenite. Utf8 payload.

Enums§

CloseCode
Message
MessageStatus
Possible states of a submitted message.
RawMessage
WSError
Possible WebSocket errors.

Type Aliases§

Error
Request