O'Reilly logo

Learning Network Programming with Java by Richard M Reese

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Asynchronous socket channels

Asynchronous communication involves making a request, and then proceeding with some other operation without having to wait for the request to be completed. This is referred to as non-blocking.

There are three classes used to support asynchronous channel operations:

  • AsynchronousSocketChannel: This is a simple asynchronous channel to a socket
  • AsynchronousServerSocketChannel: This is an asynchronous channel to a server socket
  • AsynchronousDatagramChannel: This is a channel for a datagram-oriented socket

The read/write methods of the AsynchronousSocketChannel class are asynchronous. The AsynchronousServerSocketChannel class possesses an accept method, which returns an AsynchronousSocketChannel instance. This method is also asynchronous. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required