Expand description
§koh-input — the UserInput SSP state
The client→server half of the synchronized world: the user’s keystrokes and window-size
changes, modeled as an ordered, append-only log so it flows through the SSP just like the
screen does (diff’d, sequenced, acked) and is therefore never lost or duplicated across
drops. A direct port of mosh’s Network::UserStream.
§Storage vs. wire
Internally the log is per-byte (InputEvent::Byte) so an already-acked prefix is a
clean prefix of the current state — that is what makes SyncState::diff_from and
SyncState::subtract_prefix correct as simple range operations. On the wire, the diff
coalesces consecutive bytes into WireEvent::Keys blobs (mosh’s keystroke packing),
so a typed run costs one length-prefixed blob, not one tag per byte.
Structs§
- User
Input - The ordered keystroke/resize stream the client authors and the server applies.
Enums§
- Input
Event - One stored input event. Keystrokes are stored a byte at a time so the log stays a clean append-only sequence (resizes are interleaved in typing order and never coalesced).
- Wire
Event - One wire event: the compact, coalesced form of a diff (a typed run packs into
Keys).