Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Does the programmer alsways need do implement checksum check after sending file via network?  RSS feed

 
Dmitry Zhuravlev
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are several protocol which allow for sending files via network. FTP, SSH, HTTP, simple TCP. If the file was sent via network it can be corrupted. So the programmers would like to check the correctness of the version of file that was sent. This can be done with the help of md5 hash, or in some different way.

A question is: is there some network protocols which do this check for the programmer thus we dont need to implement it manually and can rely upon the functions of protocol client?

For example, in SSH there are some check of hash of the file, and probably FTP has something. Does TCP checks the checksum of the transfered packet?.. Which protocols have these checks? Is this enough, or we always should check it?

 
Henry Wong
author
Sheriff
Posts: 22832
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dmitry Zhuravlev wrote:Does TCP checks the checksum of the transfered packet?


Yes. TCP does checksums. This will cause packet drops (and retransmissions) on checksum failure.

So, in my opinion, if you are transferring files across a trusted network, you can probably get away with no additional checksums.

Henry
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!