InetAddress addr = InetAddress.getByName(remoteURI.getHost());
socketChannel = SocketChannel.open();
socketChannel.configureBlocking(true);
socketChannel.connect(new InetSocketAddress(addr, port));
} catch (Exception e) {
throw new ConnectionFailedException("" + e);
}
try {
socketChannel.socket().setTcpNoDelay(enableTcpNoDelay);
DataOutputStream out = new DataOutputStream(socketChannel.socket().getOutputStream());