GameCult.Networking: resend the capped frame's answer until acknowledged, then end the session #49
Loading…
Reference in a new issue
No description provided.
Delete branch "libby/cs-capped-answer-reliable"
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?
Follow-up
capped-answer-delivery-ts-rs-cs, C#; Python isfe73795d, TS is #47, Rust #48.RudpCultNetSchemaServersent the 8th undecodable frame'smessage_invalid(already on the reliable channel) and calledEndPeerSessionin the same breath; ending clears the session's pending reliable packets, so a lost datagram was never resent. NowEndPeerSessionWhenAnsweredmarks the peer, andCultNetRudpSocketTransportServer.EndAnsweredPeers(run fromTryReceiveOnceandPollResends) ends it with the same goodbye once the peer has acknowledged every packet or after a 2 s grace. Frames behind the capped one are not dispatched, and the peer's queued ones are dropped.Touches no gate: the C# schema server has no write-authority path; the diff is the cap's ending only. The refusal frame and its content are unchanged.
Tests (three new, real UDP raw client): a lost capped answer is resent by
PollResendsand the goodbye comes only after the ack; an unacknowledged one ends after the grace; nothing behind the cap is dispatched. The existing cap test now acknowledges before the session ends. Nine hand mutants under prlimit cpu=300 and DOTNET_GCHeapHardLimit=4GiB: grace 0, grace 60 s, end without waiting (always / deadline only / ack only), no dispatch guard, end at once as before, no end check inTryReceiveOnce, none inPollResends; all killed (the 60 s one survived until the test stopped reading the grace constant it was meant to pin; the tenth pattern did not match). Networking tests: 508 pass, 4 skipped.🤖 Generated with Claude Code