bind(true);
IoConnector connector = newConnector();
IoSession[] sessions = new IoSession[5];
connector.setHandler(new IoHandlerAdapter());
for (int i = 0; i < sessions.length; i++) {
ConnectFuture future = connector.connect(createSocketAddress(port));
future.awaitUninterruptibly();
sessions[i] = future.getSession();
assertTrue(sessions[i].isConnected());
assertTrue(sessions[i].write(IoBuffer.allocate(1)).awaitUninterruptibly().isWritten());
}