diff options
Diffstat (limited to 'src/protocol')
| -rw-r--r-- | src/protocol/wire.rs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/protocol/wire.rs b/src/protocol/wire.rs index 655f47cb..4af2c794 100644 --- a/src/protocol/wire.rs +++ b/src/protocol/wire.rs @@ -13,7 +13,7 @@ use serde::{Deserialize, Serialize}; // --------------------------------------------------------------------------- /// Current protocol version. Bumped when wire format changes incompatibly. -pub const PROTOCOL_VERSION: u32 = 19; +pub const PROTOCOL_VERSION: u32 = 20; /// Maximum allowed frame payload size (2 MB). Frames larger than this are /// rejected to prevent denial-of-service via oversized length prefixes. @@ -711,6 +711,12 @@ pub enum ServerMessage { /// Whether the ASCII input source should be active. active: bool, }, + + /// Ring the foreground client's outer terminal for pane-originated BEL characters. + TerminalBell { + /// Number of BEL characters parsed from one PTY read. + count: u16, + }, } // --------------------------------------------------------------------------- @@ -1555,6 +1561,15 @@ mod tests { } } + #[test] + fn server_terminal_bell_roundtrip() { + let msg = ServerMessage::TerminalBell { count: 3 }; + let encoded = bincode::serde::encode_to_vec(&msg, bincode::config::standard()).unwrap(); + let (decoded, _): (ServerMessage, _) = + bincode::serde::decode_from_slice(&encoded, bincode::config::standard()).unwrap(); + assert_eq!(msg, decoded); + } + // ---- Framing ---- #[test] |
