Skip to main content

Module sockudo

Module sockudo 

Source
Expand description

sockudo-ws backend for the transport abstraction.

Mirrors the layout of the tungstenite module: provides From/TryFrom conversions between the neutral Message / TransportError and sockudo’s native types, plus a SockudoTransport<S> adapter that lifts a sockudo [WebSocketStream<S>] into the backend-agnostic WsTransport trait.

The Message enums are structurally identical: both carry payloads as bytes::Bytes across all five variants, so conversions are zero-copy and infallible.

Request bytes come from sockudo’s header-aware builder; the response loop stays local so upgrade rejections map to TransportError::UpgradeRejected with host-context logging instead of collapsing into a handshake failure.

Structs§

SockudoTransport
Adapter that lifts a sockudo-ws [WebSocketStream<S>] into a backend-agnostic WsTransport.