Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 26th, 2007, 5:21 PM   #1
haba
Newbie
 
Join Date: Nov 2007
Posts: 10
Rep Power: 0 haba is on a distinguished road
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!
haba is offline   Reply With Quote
Old Nov 26th, 2007, 5:33 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Re: udp checksum

Stop. Read. Think. Discriminate.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Nov 26th, 2007, 5:36 PM   #3
Dameon
Troll
 
Dameon's Avatar
 
Join Date: Apr 2005
Location: Texas
Posts: 732
Rep Power: 4 Dameon is on a distinguished road
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.
__________________
MD5(sig) = bcef75433db02e9ad9bf81d6f7c5c270
Dameon is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sockets problem haba C 10 Nov 19th, 2007 2:03 AM
Packet Sniffer - extracting payload from TCP header Brent C 2 Sep 22nd, 2007 11:28 PM
HELP! "field has incomplete type" TaviO! C 6 Apr 24th, 2006 4:05 PM
Backup Script :-) Pizentios Perl 18 Jan 12th, 2006 10:50 AM
Converting ANSI characters to hex for Checksum. JawaKing00 C 4 Sep 9th, 2005 5:07 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:31 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC