O'Reilly logo
  • Jubin Kuriakose thinks this is interesting:

Next, completed() calls accept() on the server socket channel with the passed Attachment object and a reference to the current completion handler as arguments. This call allows the server to respond to the next incoming connection.

From

Cover of Java I/O, NIO and NIO.2

Note

Why is the accept called the second time from the CompletionHandler