Is it possible for packets sent using TCP to ever arrive with different data? [closed]

Sometimes in my networking library when I send a packet the data arrives different than when I sent it. I assumed that TCP guarenteed exact delivery. Is this true? Or must there be something wrong in the packaging and receiving process of my own library code?

Answer

TCP does NOT guarantee exact delivery of your data at the level of an individual packet.

Instead TCP provides the framework to determine integrity of the data by including sequence numbers and checksums in the header of every packet, which the recipient should check and a mechanism where the recipient can request the sender to retransmit packets when packets don’t arrive at all or the checksums fail.

Attribution
Source : Link , Question Author : tcpstar , Answer Author : HBruijn

Leave a Comment