views:

14

answers:

2

If a write(ByteBuffer) completes, does it mean that the other side has received the data. Would TCP ensure that the data would reach other side?

A: 

No. It is only sure, that the data was written into the local socket buffer. But you cant assure that it will also be transmitted (network failure...).

Markus Kull
A: 
  1. No.
  2. TCP will make its best endeavour. You are guaranteed that if it arrives it will be intact and in the correct order up to the point of the final correctly executing receive.
EJP