hyperlane-plugin-websocket 23.2.0

A WebSocket plugin for the Hyperlane framework, providing robust WebSocket communication capabilities and integrating with hyperlane-broadcast for efficient message dissemination.
Documentation
1
2
3
4
5
6
7
8
9
use super::*;

/// Global process-wide [`WebSocketPlugin`] singleton initialized via [`WebSocketPlugin::init`].
pub(crate) static WEBSOCKET_PLUGIN: OnceLock<WebSocketPlugin> = OnceLock::new();

thread_local! {
    /// Worker-local pool of reusable WebSocket frame coalescing buffers avoiding idle retention.
    pub(crate) static WS_COALESCE_BUF_POOL: RefCell<Vec<Vec<u8>>> = const { RefCell::new(Vec::new()) };
}