[domistream] Host: ENet accepting side and control host #11
Reference in New Issue
Block a user
Delete Branch "feature/host-enet-control"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Lumen L1, host side of the control channel:
enet::host(the accepting side of the ENet-1.3-compatible layer, one peer per client address, the caller demultiplexes) andcontrol::host(AES-GCM client frames with the 'C' nonce and replay refusal, typed client messages, host messages, a stop deadline), tests first. PROTOCOL.md 3.1 gains "The accepting side", 3.3 a host-side paragraph.EnetHostPeer: accept/verify connect, session ids, MTU/window/channel clamping, reliable/unreliable/unsequenced channels, 64 KiB fragments, acks, pings, retransmission, timeouts, disconnect both ways (queued packets flushed first). Not implemented: checksum, compression, host-side throttling, unreliable fragments (dropped).ControlHost: StartB, PeriodicPing, Input (viainput::parse_input), IdrRequest, InvalidateRefFrames, Loss/FrameStats raw, Unknown skipped; sends rumble, trigger rumble, motion, RGB LED, extended termination. HDR_MODE returnsUnsupported: its layout is GPL-provenance [M*] until measured.EnetClientstores the verify's session ids the other way round from stock ENet; harmless while both are equal (our case). Follow-up: a one-line fix with a test in a client PR.Evidence: 55 new tests (our
EnetClient/ControlStreamagainst the host over an in-memory wire with loss, duplication, reorder and simulated time; 16-bit wrap with 66,000 packets each way; replay/forgery/reflection dropped; properties). Rebased on PRs #9 and #10: 364 passed / 0 failed; clippy and fmt clean. Fuzz:enet_host2,534,001 runs / 60 s and 26,839,291 runs / 600 s,control_host611,513 runs / 60 s, 0 crashes.Clean-room checklist
2662c0dhost-side functions ofprotocol.candenet.hwindow constants (MIT, approved; S-34). Earlier facts S-10, S-17, S-21.Self-review: rebase conflicts were append-only (fuzz bins, source log rows; both kept). Checked that unknown/malformed frames inside the encrypted frame are skipped and outside are dropped, as 3.3 says; the duplicated receive/retransmit code (host vs client) is a known follow-up, not a defect. U9/U10/U11/U21/U23 open questions are listed for the black-box measurement.
4415ab58e1tof0aac13f12