Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is CRC needed in sockets communications?

Status
Not open for further replies.

colttaylor

Programmer
Aug 20, 2002
117
US
I'm coding a remote reporting tool which collects several hundred lines of text and then periodically sends them through a winsock connection to another "collecting" application. My question is...

Should I implement a CRC checksum on each line to assure that it gets to the collecting application without being mangled? Or is checksum-like data protection something which is built in to ip communications?

Thanks for your future assistance,
Peace,
Colt. If it's stupid but it works, it isn't stupid
 
A CRC is generated automatically by TCP, but it is for the entire payload. Generating a CRC for each line of a multi-line payload would be a waste of bandwidth, because if the packet has an error, the entire packet will be rejected and a resend requested.
pansophic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top