linux tomcat使用nio处理请求 调用jvm native C++ 底层调用系统函数源码原理
##Acceptor接受socket
socket = endpoint.serverSocketAccept();

##NioEndpoint serverSock.accept()

##ServerSocketChannelImpl n = accept(this.fd, newfd, isaa);

##ServerSocketChannelImpl accept0

##native accept0方法 在jvm 底层实现
接受客户端的请求

##接收socket 给poller的selector


##添加事件


##读写事件 取消事件cancelledKey



##取消事件




##消费取消事件

##从epoll红黑树删除

##socket 连接 关闭 修改事件

##poller 线程从队列取出PollerEvent,通过调用ctl 添加到linux红黑树
##添加事件

##读写事件



##EPoll.wait拿到需要读写的SelectionKey , 将需要处理SelectionKey添加到selector.selectedKeys



##poller selector迭代selectionKey读写事件

##调用native方法fd添加到epoll红黑树

##EPoll native 方法

##EPoll native 方法在jvm c实现






















