Skip to main content

Module types

Module types 

Source
Expand description

Shared transport halves, message handlers, and writer commands.

MessageReader and the internal writer use BoxedWsTransport, keeping lifecycle code independent of the selected transport backend. MessageHandler receives messages without connection identity, while EpochMessageHandler attaches the owning reader’s connection epoch to application messages and reconnect notifications.

The channel handlers convert neutral Message values to Tungstenite messages at the adapter compatibility boundary. WriterCommand remains internal so all sink access, connection swaps, and reconnect buffering stay serialized in the writer task.

Functions§

channel_epoch_message_handler
Creates a channel-based message handler carrying each reader’s connection epoch.
channel_message_handler
Creates a channel-based message handler.

Type Aliases§

CloseHandler
Handles a peer close frame and decides whether automatic reconnection continues.
EpochMessageHandler
Function type for handling WebSocket messages with connection ownership.
EpochPingHandler
Function type for handling WebSocket ping messages with connection ownership.
MessageHandler
Function type for handling WebSocket messages.
MessageReader
Stream half of the active WebSocket transport.
PingHandler
Function type for handling WebSocket ping messages.