accept事件
在Channel向Selector注册的时候创建了对应该Channel的SelectionKeysImpl,这时初始化的感兴趣事件就是该OP_ACCEPT,
进行第一步判断
if (key.isAcceptable()) {
此时的SelectionsKey(也就是刚刚注册到Selector的Channel)感兴趣的事件就是OP_ACCEPT。
执行scc.accept得到SocketChannel。
将SocketChannel注册到selector
将SocketChannel注册到selector
作为Channel注册到Selector步骤一样,这是第二个注册到selector的Channel
writeable事件
通过自定义send方法处理SelectionKeyImpl
可写事件已就绪
自定义处理可写事件