ET模型下不是缓冲区由写变为不可写的时候EPOLLOUT才返回吗?我这个写不是总是返回的,而是有EPOLLIN 的时候才会带一次。man手册里面这样说
When used as an edge-triggered interface, for performance reasons, it is possible to add the file descriptor inside the epoll inter‐face (EPOLL_CTL_ADD) once by specifying (EPOLLIN|EPOLLOUT). This allows you to avoid continuously switching between EPOLLIN and EPOLLOUT calling epoll_ctl(2) with EPOLL_CTL_MOD.
难道我理解错了?