Repository navigation
feat(network): Send commands directly across the peer mesh - #661
Open
tintinhamans wants to merge 8 commits into
Open
tintinhamans wants to merge 8 commits into
tintinhamans wants to merge 8 commits into
Conversation
tintinhamans
force-pushed
the
arctic/go/stack2/06-direct-send
branch
4 times, most recently
from
October 26, 2026 15:39
dc81af3 to
d016ea6
Compare
…and forwarded traffic
tintinhamans
force-pushed
the
arctic/go/stack2/06-direct-send
branch
from
October 28, 2026 01:47
d016ea6 to
ee259f3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge after #660.
Every player sent its commands to the packet router only and the router forwarded them, so a command of a non-router player took two hops and the router's upload carried the whole match. The mesh is already fully connected, so the second hop is extra latency and extra load on one machine.
With
send.direct(true) every player sends its commands straight to each peer while every active peer has a direct mesh connection, and the acks come back from each peer.ConnectionManager::isDirectSendActiverechecks the links every 250 ms and logs[DIRECT]when the mode changes. When a connection drops or is not direct, commands fall back to the packet router. A peer that is quitting does not count, and a frame's latency is the slowest peer's round trip.The arrival decides how a command is acked: one that came straight from its author is acked to it, one the router passed on is acked to the router, so peers in different modes still drain each other's acks. If the transport does not say who sent a packet (anticheat transport), the receiver's own mode is used. A peer that stops acking but is not yet removed holds back that frame's latency measurement until it is pruned, so the measured delay can be stale for those seconds.
send.directis the only new key, on by default as in the tester build, and the service can turn it off. No wire change.Tested: builds x86 Release
z_generals. In the 3 player rig (full stack) a forced mixed direct and relay link drained its acks, 0 CRC mismatches, n=1.