]> git.xonotic.org Git - xonotic/darkplaces.git/commit
net_slist: overhaul dpmaster and server pinging
authorbones_was_here <bones_was_here@xonotic.au>
Tue, 31 Oct 2023 01:24:47 +0000 (11:24 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Sat, 9 Dec 2023 10:13:25 +0000 (20:13 +1000)
commitfe2b222e32752c408fbe5ccf4ac3fb546f8ff41a
treeac8a8ff171364ca2edc4febc2c1c0462cf8fd480
parent44062df4df97288f0c76edd003f4e6d809add1c3
net_slist: overhaul dpmaster and server pinging

Fixes https://gitlab.com/xonotic/darkplaces/-/issues/173
Fixes https://gitlab.com/xonotic/darkplaces/-/issues/211

Adds cvars net_slist_maxping, net_slist_interval, net_slist_debug.

Simplifies state tracking, ping is now either valid or not set (0) and
isn't abused to store state.

Includes a hash-verified timestamp in pings, fixes impossible pings
(happened when querytime was updated before response arrived) and the
ability to add servers to a client's list with unsolicited packets
(abusing the LAN support).

Checks that DP/QW master server list packets originate from a configured
master (cvar net_sourceaddresscheck).

Fixes unreliable LAN support.

Significantly reduces the total time to complete a full query cycle for
DP servers by improving the logic as well as turning up some cvars.

Prints warnings if DP or QW master server queries time out.

Makes net_slist_maxtries actually give better ping reports like its
description says.

Makes net_slist_pause completely pause (QC builtin resorthostcache()
used by Xonotic and Nexuiz bypassed it), clarifies description, uses a
callback instead of polling to handle changes.

Changes sv_masters[] and sv_qwmasters[] iteration to a more idiomatic
pattern pattern (numeric limit instead of a "null cvar" terminator).

Checks that sockets are open before writing to them in
NetConn_QueryQueueFrame() to avoid crashing in case we ever close a
lower numbered socket while a higher numbered one is still open.

Separates QW master list parsing into a func (like DP list parsing).

Fixes sending a DP master query string to the QW masters if the first
socket is an IPv6 one.

Fixes double-sending of QW favourite queries.

Minor cleanups/refactoring.

Signed-off-by: bones_was_here <bones_was_here@xonotic.au>
mvm_cmds.c
netconn.c
netconn.h