Trail: Sockets Direct Protocol
Lesson: Understanding the Sockets Direct Protocol
Supported Java APIs
Home Page > Sockets Direct Protocol > Understanding the Sockets Direct Protocol
Supported Java APIs
All of the APIs that use TCP can use SDP. This specifically includes the following classes:

When SDP support is enabled, it "just works" without any change to your code — recompiling is not necessary. However, it is important to know that a socket is bound only once. A connection is an implicit bind, so if the socket hasn't been previously bound and connect is invoked, the binding occurs at that time.

For example, consider the following code snippet:

AsynchronousSocketChannel ch = AsynchronousSocketChannel.open();
ch.bind(local);
Future result = ch.connect(remote);

In this snippet, the asynchronous socket channel is bound to a local TCP address when bind is invoked on the socket. Then, the code attempts to connect to a remote address using the same socket. If the remote address uses InfiniBand, as specified in the configuration file, the connection will not be converted to SDP because the socket has been previously bound.

Previous page: Solaris Support
Next page: More Information