hyperlane-plugin-websocket 23.1.0

A WebSocket plugin for the Hyperlane framework, providing robust WebSocket communication capabilities and integrating with hyperlane-broadcast for efficient message dissemination.
Documentation
/// Pre-concatenated point-to-point key prefix including the trailing separator hyphen.
pub(crate) const POINT_TO_POINT_PREFIX: &str = "ptp--";

/// Pre-concatenated point-to-group key prefix including the trailing separator hyphen.
pub(crate) const POINT_TO_GROUP_PREFIX: &str = "ptg--";

/// Stack buffer capacity in bytes for formatting broadcast room keys without heap allocation.
pub(crate) const STACK_KEY_BUF_LEN: usize = 64;

/// ASCII hyphen separator byte used in broadcast keys and negative integers.
pub(crate) const BYTE_DASH: u8 = b'-';

/// ASCII zero digit byte.
pub(crate) const BYTE_ZERO: u8 = b'0';

/// Lowercase ASCII representation of `true`.
pub(crate) const BOOL_TRUE_BYTES: &[u8] = b"true";

/// Lowercase ASCII representation of `false`.
pub(crate) const BOOL_FALSE_BYTES: &[u8] = b"false";

/// Two-digit ASCII decimal lookup pairs for `00..=99`.
pub(crate) const DEC_DIGITS_LUT: &[u8; 200] = b"00010203040506070809\
10111213141516171819\
20212223242526272829\
30313233343536373839\
40414243444546474849\
50515253545556575859\
60616263646566676869\
70717273747576777879\
80818283848586878889\
90919293949596979899";

/// Maximum queued message count considered when pre-sizing the reusable frame buffer on first burst.
pub(crate) const WS_COALESCE_EST_MAX_MSGS: usize = 64;

/// Maximum coalesced broadcast frame bytes accumulated per single stream write.
pub(crate) const WS_COALESCE_MAX_BYTES: usize = 64 * 1024;

/// Maximum reusable heap buffer capacity retained after an oversized broadcast frame.
pub(crate) const WS_FRAME_BUF_MAX_RETAIN: usize = 128 * 1024;

/// Prebuilt RFC 6455 empty final text frame (`FIN=1, opcode=Text, len=0`).
pub(crate) const WS_EMPTY_TEXT_FRAME: [u8; 2] = [0x81, 0x00];

/// RFC 6455 `FIN` bit flag (`0x80`).
pub(crate) const WS_FIN_BIT: u8 = 0x80;

/// RFC 6455 continuation frame opcode (`0x00`).
pub(crate) const WS_OPCODE_CONTINUATION: u8 = 0x00;

/// RFC 6455 text frame opcode (`0x01`).
pub(crate) const WS_OPCODE_TEXT: u8 = 0x01;

/// RFC 6455 binary frame opcode (`0x02`).
pub(crate) const WS_OPCODE_BINARY: u8 = 0x02;