websocket_plugin library

Classes

AckManager
Tracks outgoing messages and waits for server ACK responses.
ChannelManager
Routes incoming messages to registered WebSocketTopics and wraps outgoing messages in the topic envelope format.
CompressionInterceptor
Interceptor that gzip-compresses outgoing messages above threshold bytes and transparently decompresses incoming compressed messages.
InterceptorChain
Manages an ordered chain of WebSocketInterceptors.
LoggingInterceptor
A simple logging interceptor for debugging.
MessageQueue
Buffers outgoing messages while the connection is down.
MockWebSocketAdapter
Mock WebSocket adapter for testing purposes
QueuedMessage
A single message held in the queue with metadata for expiry tracking.
WebSocketAdapter
Abstract adapter interface for WebSocket implementations This allows for easy switching between different WebSocket libraries
WebSocketChannelAdapter
WebSocket adapter implementation using the web_socket_channel package
WebSocketClient
High-level WebSocket client that integrates all plugin features: heartbeat, reconnection, interceptors, message queue, ACK, and topic channels.
WebSocketConfig
Configuration class for WebSocket connections
WebSocketInterceptor
Interceptor that can inspect and transform messages before sending or after receiving.
WebSocketMessage
Represents a WebSocket message with metadata
WebSocketPool
Manages a pool of WebSocketClient instances across multiple server endpoints.
WebSocketTopic
A logical sub-channel scoped to a specific topic name.

Enums

PoolStrategy
Strategy for selecting a client from the pool.
WebSocketState
Represents the current state of a WebSocket connection

Extensions

WebSocketStateExtension on WebSocketState
Extension to provide human-readable descriptions