![]() |
udp checksum
Hi,
I'm trying to add some reliabilty over UDP, but I'm a bit confused over its use of checksum. UDP implements a checksum, right? If so, how can I use it to add some reliability in case of error in the packet? Should I implement my own checksum? Thanks! |
Re: udp checksum
Stop. Read. Think. Discriminate.
|
Re: udp checksum
You don't have to worry about it. If there's an error in the packet, it will be dropped silently. As if it hadn't arrived. What you have to worry about is making sure a clean copy arrives eventually, if necessary. If you are sending regular position/velocity updates for a game, there's no need to waste time resending old data (which is why TCP typically isn't used in these scenarios). If you send something which must arrive, things are more difficult. It can be as easy as retransmitting until the target sends a confirmation (confirmation retransmitted for each request received; each side would have to ignore duplicates). TCP does a great job when all of your data needs to be arrive and in the right order. UDP does a great job when the concern is immediacy. A simple reliability layer on UDP is very common for the 'important' stuff that fits somewhere in between.
|
| All times are GMT -5. The time now is 3:17 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC