Reliable UDP is re-sending old UDP datagrams

G

GhostlyImprints

Guest
In GMS2, you can enable an internal reliable UDP protocol they've developed for your network games:

network_set_config(network_config_enable_reliable_udp, udpSocket);

I did a test, and I sent 500 messages at once to another player over my local network.

In each message, I put an incremental number and the date I sent it at. When a player receives it, they write the number and the date to a log file.

If reliable UDP is disabled, the log file shows all 500 messages being received properly.

However, if reliable UDP is enabled, the log file shows 500 messages, and then 254 more messages after (always 254, no more no less)

The 254 messages have dates from the initial 254 messages that were sent, so it's determined that these extra messages are being re-sent.

Why does GameMaker's reliable UDP resend messages even though the initial 500 messages were received properly? And it's always 254 extra/old/resent messages in this test case.
This was done over the local network too, there should be no reason datagrams should be resent.

Log text files:
RELIABLE_UDP_OFF
RELIABLE_UDP_ON
 
Top