Network manager: implement packet dispatch and simulator lifecycle #53
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Objective
Implement packet callback dispatch, simulator collections/state, connection setup, enable/disable, keepalive, disconnect, and handler registration.
Deliverables
Validation
Prerequisite
Wire codegen and the foundational implementation milestones are complete; the fixed API/test gates remain authoritative.
Project constraints
Implemented and pushed in commit
d298b4f.The native Rust implementation now provides ordered packet and CAPS dispatch, conservative asynchronous callback behavior, typed RAII subscription guards, synchronized simulator collections, circuit/seed/current-simulator state, cancellable connection setup, reliable UseCircuitCode ACK waiting, region-handshake reply state, CAPS EnableSimulator, UDP DisableSimulator and KickUser handling, StartPingCheck ACK flushing and pong replies, two-interval keepalive detection, deterministic disconnect/shutdown reasons, and runtime-neutral async compatibility methods. All queues and workers are bounded, callbacks are invoked from lock-free snapshots, and internal callbacks/tasks use weak ownership so they do not retain a dropped GridClient. Documentation and generated API coverage were updated.
Verification completed in isolation:
The fake simulators cover connection reuse, circuit ACKs, handshake replies and timeout behavior, immediate pending-ACK flush before pong, enable/disable, current/seed selection, callback ordering/filtering/reentrancy, concurrent registration/removal and disconnect, and keepalive shutdown without requiring a live grid.