public void connect() {
try {
channel = SocketChannel.open(new InetSocketAddress(host, port));
channel.configureBlocking(false);
} catch (IOException e) { e.printStackTrace(); }
socket = new AsynchronousSocket(channel);
IOLoop.INSTANCE.addHandler(channel, socket, SelectionKey.OP_READ, ByteBuffer.allocate(1024));
}