Expand description
Pure framing + reach-config parsing for the browser moq subscriber.
These are the transport-independent, side-effect-free pieces of the moq
worker (moq_worker.rs, wasm-only). They live here — NOT gated on
target_arch = "wasm32" — so they can be unit-tested on the host. The wasm
worker re-uses them; the moq subscribe/WebTransport integration itself is
exercised by the downstream browser e2e.
Structs§
- Reach
Config - Network-routable reach the frontend selects (via
selectReach) and passes to the worker as JSON. The moq broadcast path (which track to subscribe) is NOT here — it arrives later in asubscribecommand, since one worker can serve several subscriptions on the same endpoint.
Functions§
- decode_
frame - Decode one DMA frame. Returns
(track_name, payload), orNoneif the buffer is malformed (too short, length prefix past the end, or a non-UTF-8 track name). - encode_
frame - Encode one DMA frame.
- parse_
reach - Parse the reach JSON the frontend emits into a
ReachConfig, base64-decoding the cert hashes.