开发者

Java SocketChannel write and read correlation

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?


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...).


  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.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜