garrysmod-issues icon indicating copy to clipboard operation
garrysmod-issues copied to clipboard

net.Start `unreliable` argument is insanely degraded on P2P servers

Open DBotThePony opened this issue 3 years ago • 3 comments

Details

Sending almost anything over net with unreliable set to true (of net.Start) will pretty much never reach destination (except very little net messages).

While playing dedicated or not P2P server, unreliable net lib work pretty much like reliable net lib (but progressively faster with higher ping), except in cases where client suffer packet loss.

This bug render pretty much any addon that use unreliable network transporting non-functional. This impact addons such as PAC3, DLib.Net (using unreliable for reducing RTT latency), and many others.

Steps to reproduce

net.Start('some_network_string', true)
net.WriteUInt(4000, 32)
net.WriteData(<4000 octet long data>, 4000)
net.Broadcast()

Message above will never reach P2P clients. But

net.Start('some_network_string', false)
net.WriteUInt(4000, 32)
net.WriteData(<4000 octet long data>, 4000)
net.Broadcast()

Will work, and will be read by P2P clients almost instantly.

DBotThePony avatar Jun 15 '21 05:06 DBotThePony

Who would have thought that something literally called unreliable would be so unreliable? The name just screams dependability.

SneakySquid avatar Jul 01 '21 19:07 SneakySquid

In non-P2P it works fine so it's a P2P bug. Has nothing to do with it being 'unreliable'.

thegrb93 avatar Jul 01 '21 19:07 thegrb93

Unreliable != will never be received

WilliamVenner avatar Jul 01 '21 19:07 WilliamVenner