Prevent RUDP snapshot traffic from starving peers

This commit is contained in:
Meta Vens 2026-07-12 19:42:16 +01:00
commit fbee58eba1
3 changed files with 24 additions and 3 deletions

View file

@ -157,6 +157,11 @@ namespace GameCult.Networking
IPAddress.IsLoopback(remoteAddress) ? IPAddress.Loopback : IPAddress.Any,
0));
socket.ReceiveTimeout = 20;
if (string.Equals(Environment.GetEnvironmentVariable("CULTNET_TRACE_RUDP"), "1", StringComparison.Ordinal))
{
Console.Error.WriteLine(
$"CultNet RUDP client bind local={socket.LocalEndPoint} remote={remoteAddress}:{port} runtime={_runtimeId}");
}
_transport = new CultNetRudpSocketTransportConnection(new CultNetRudpSocketTransportOptions
{
RuntimeId = _runtimeId,