• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Info on UDP checksums

 
Neil Forrest
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can anyone steer me to easy to follow information on doing checksums and in particular with UDP?
Thanks,
Neil
 
Edwin Dalorzo
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you can calculate a checksum using two different classes in Java. You can use the java.util.zip.CRC32 or the java.util.zip.Adler32 implementations.

Both of them implement java.util.zip.Checksum.

Now, when it comes to UDP Datgram packets. You can update the Checksum until you have sent or received all the data, and then calculate the checksum.

Somewhat like this:



Good luck, comrade!
[ June 09, 2006: Message edited by: Edwin Dalorzo ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic