Skip to main content

Crate rama_ws

Crate rama_ws 

Source
Expand description

WebSocket (WS) support for rama (RFC 6455).

§Cancel safety

Reading messages is cancel-safe. AsyncWebSocket has no dedicated read methods; messages arrive through its Stream implementation, and reading a message via StreamExt::next follows that trait’s cancel-safety: if the next() future is dropped before it resolves (for example, as a branch of tokio::select! that another branch completes first), no message is lost. The next poll resumes from the same position in the stream.

The Sink side (sending) does not carry a documented cancel-safety guarantee.

§Rama

Crate used by the end-user rama crate and rama crate authors alike.

Learn more about rama:

Re-exports§

pub use crate::protocol::Message;
pub use crate::protocol::ProtocolError;
pub use crate::protocol::frame::Utf8Bytes;
pub use runtime::AsyncWebSocket;

Modules§

handshake
Utilities to aid in the handshake phase of establishing a WebSocket connection.
protocol
Generic WebSocket message stream.
runtime
Async runtime for Rama WebSockets