@Override
    public void connect(SelectionKey key) {
        try {
            channel.socketChannel().finishConnect();
            key.attach(channel);
        } catch (IOException e) {
            eventHandler().exceptionCaught(channel, e);
            key.cancel();
            return;
        }
        key.interestOps(SelectionKey.OP_READ);
    }
@author Robert HG (254963746@qq.com) on 2/2/16.
lts-core/src/main/java/com/github/ltsopensource/nio/processor/NioClientProcessor.java