{@link SocketChannel}-like wrapper for {@link SocketUDT}, can be either stream or message oriented, depending on {@link TypeUDT}
The UDT socket that this SocketChannel wraps will be switched to blocking mode since this is the default for all SocketChannels on construction. If you require non-blocking functionality, you will need to call configureBlocking on the constructed SocketChannel class.
you must use {@link SelectorProviderUDT#openSocketChannel()} to obtaininstance of this class; do not use JDK {@link java.nio.channels.SocketChannel#open()};
example:
SelectorProvider provider = SelectorProviderUDT.DATAGRAM; SocketChannel clientChannel = provider.openSocketChannel(); clientChannel.configureBlocking(true); Socket clientSocket = clientChannel.socket(); InetSocketAddress clientAddress = new InetSocketAddress("localhost", 10000); clientSocket.bind(clientAddress); assert clientSocket.isBound(); InetSocketAddress serverAddress = new InetSocketAddress("localhost", 12345); clientChannel.connect(serverAddress); assert clientSocket.isConnected();