Expand description
Transport-agnostic §8.7 sync-round-over-socket framing.
The realtime channel carries one-byte channel-tagged binary messages
(§8.7): tag 0x00 is a standalone SSP2 response (a delta, §8.2), tag
0x01 is a chunk of the in-flight round’s byte stream. This module owns
the tag demux and the scanner-driven response reassembly — the protocol
logic — leaving the WS send/read plumbing to each native transport. It
is deliberately free of any WS dependency so it lives in the lean client
crate and both native transports (FFI + Tauri plugin) share it via their
existing syncular-client dependency (the honest single-source, since
the crates are in different cargo workspaces and cannot share a private
module directly).
It mirrors the reference host reassembly in
packages/conformance/src/drivers/rust-client.ts (#routeBinary /
#realtimeRound), which is the reference client’s socket-round path:
tag the request 0x01, reassemble 0x01 response chunks to END,
reject bytes past END, and route 0x00 deltas + text frames to the
inbound queue for the command path to apply (§8.2). Deltas MUST NOT
arrive mid-round per server discipline (§8.7 interleaving), but the
honest client posture is tolerate-and-queue — matching the TS host,
which routes a stray delta to the inbound lane rather than failing.
Structs§
- Realtime
Round - The per-connection round state: at most one round in flight (§8.7). A
native transport creates one of these per socket and drives it from its
reader loop (
route_binary) and itsrealtime_synccall (begin/finish).
Enums§
- Round
Inbound - What a native transport should do with one inbound binary frame that the round demux classified.
Constants§
- REALTIME_
TAG_ DELTA - §8.7 channel tags. A closed registry per wire version.
- REALTIME_
TAG_ ROUND