Skip to main content

PROTOCOL_VERSION

Constant PROTOCOL_VERSION 

Source
pub const PROTOCOL_VERSION: u32 = 3;
Expand description

Separate from RPC_PROTOCOL_VERSION; bump on any non-additive change. v2 (phase 3): Set became a struct variant, Bye gained a reason. v3 (E-P0): driver events (DriverArmed, DriverRevoked, DriverTurnOutcome); old clients skip unknown via #[serde(other)]. Protocol stays exact-match; only binary versions compare directionally (reload, §2.8). Close/Closed were added without a bump: an older daemon answers the unknown ClientFrame with Error{"malformed frame: unknown variant close…"} (the client maps that to “daemon too old”), whereas a bump would refuse every older TUI that reconnects after a daemon reload. Additive ClientFrame variants that only a new client sends follow this rule; Closed only ever answers Close, so old clients never see it. Pin/Pinned (synaps daemon pin) follow the same rule, and so does SessionMeta.pinned (#[serde(default)]: an older daemon omits it). ReloadExtension and its two replies (ExtensionReloaded, ExtensionReloadFailed) follow it too.