Advertisement

Sending reliable USP packets?

Started by March 13, 2002 03:45 PM
1 comment, last by Tylon 22 years, 10 months ago
I realise that UDP is the way to go when it comes to games. But UDP is not reliable -> packetloss. Thats ok when it comes to player movement etc, coz that doesnt have to be recieved all the time, but what about key packets which must be sent successfully ? Is there a better, foolproof way to ensure a packet gets there, than resending it a given number of times ?
quote: Original post by Tylon
I realise that UDP is the way to go when it comes to games. But UDP is not reliable -> packetloss.

Thats ok when it comes to player movement etc, coz that doesnt have to be recieved all the time, but what about key packets which must be sent successfully ? Is there a better, foolproof way to ensure a packet gets there, than resending it a given number of times ?


Mark your must have packets. Then have the opposite end send an acknowledgement when it''s recieved. Keep resending until you get back an ack. On the other end, just keep acking if you get duplicate packets.

This is the most common way to handle reliable communications.
Advertisement
thx, quick reply

This topic is closed to new replies.

Advertisement