// prepare a channel to connect
InetSocketAddress address = new InetSocketAddress(host, port);
SocketChannel channel = SocketChannel.open();
// configure the channel for no-blocking and selection
channel.configureBlocking(false);
SelectionKey selectionKey = channel.register(connectionManager.getNIODaemon().getSelector(), SelectionKey.OP_CONNECT);
// prepare the handler for the connection
client = CTPConnection.client(host, selectionKey, handler, connectionManager);
selectionKey.attach(client);