1

Question regarding AsynchronousSocketChannel.write method

public final <A> void write(ByteBuffer src,
             A attachment,
             CompletionHandler<Integer,? super A> handler)

Does this method guarantee ACK is received before the handler is fired?

Or it just ensures the ByteBuffer is delivered to network driver of local machine?

Mr.Wang from Next Door
  • 13,670
  • 12
  • 64
  • 97

1 Answers1

1

Neither. It ensures that the data has been transferred into the socket send buffer. From there it goes asynchronously to the NIC and from there to the network.

user207421
  • 305,947
  • 44
  • 307
  • 483