Finding out if a message over tcp was delivered

The sending TCP does know when the data gets acknowledged by the other end, but the only reason it does this is so that it knows when it can discard the data (because someone else is now responsible for getting it to the application at the other side).

It doesn’t typically provide this information to the sending application, because (despite appearances) it wouldn’t actually mean much to the sending application. The acknowledgement doesn’t mean that the receiving application has got the data and done something sensible with it – all it means is that the sending TCP no longer has to worry about it. The data could still be in transit – within an intermediate proxy server, for example, or within the receiving TCP stack.

“Data successfully received” is really an application-level concept – what it means varies depending on the application (for example, for many applications it would only make sense to consider the data “received” once it has been synced to disk on the receiving side). So that means you have to implement it yourself, because as the application developer, you’re really the only one in a position to know how to do it sensibly for your application.

Leave a Comment