1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/// Pre-concatenated point-to-point key prefix including the trailing separator hyphen.
pub const POINT_TO_POINT_PREFIX: &str = "ptp--";
/// Pre-concatenated point-to-group key prefix including the trailing separator hyphen.
pub const POINT_TO_GROUP_PREFIX: &str = "ptg--";
/// Stack buffer capacity in bytes for formatting broadcast room keys without heap allocation.
pub const STACK_KEY_BUF_LEN: usize = 64;
/// ASCII hyphen separator byte used in broadcast keys and negative integers.
pub const BYTE_DASH: u8 = b'-';
/// ASCII zero digit byte.
pub const BYTE_ZERO: u8 = b'0';
/// Lowercase ASCII representation of `true`.
pub const BOOL_TRUE_BYTES: & = b"true";
/// Lowercase ASCII representation of `false`.
pub const BOOL_FALSE_BYTES: & = b"false";
/// Two-digit ASCII decimal lookup pairs for `00..=99`.
pub const DEC_DIGITS_LUT: & = 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 const WS_COALESCE_EST_MAX_MSGS: usize = 64;
/// Maximum coalesced broadcast frame bytes accumulated per single stream write.
pub const WS_COALESCE_MAX_BYTES: usize = 64 * 1024;
/// Maximum reusable heap buffer capacity retained after an oversized broadcast frame.
pub const WS_FRAME_BUF_MAX_RETAIN: usize = 128 * 1024;
/// Prebuilt RFC 6455 empty final text frame (`FIN=1, opcode=Text, len=0`).
pub const WS_EMPTY_TEXT_FRAME: = ;
/// RFC 6455 `FIN` bit flag (`0x80`).
pub const WS_FIN_BIT: u8 = 0x80;
/// RFC 6455 continuation frame opcode (`0x00`).
pub const WS_OPCODE_CONTINUATION: u8 = 0x00;
/// RFC 6455 text frame opcode (`0x01`).
pub const WS_OPCODE_TEXT: u8 = 0x01;
/// RFC 6455 binary frame opcode (`0x02`).
pub const WS_OPCODE_BINARY: u8 = 0x02;