struct epoll_event ev, events[20];
ev.events = EPOLLOUT | EPOLLONESHOT;
ev.data.sock = some_socket;
epoll_ctl(epfd, EPOLL_CTL_ADD, some_socket, &ev);
// then the EPOLLOUT event has triggered by epoll_wait
epoll_ctl(epfd, EPOLL_CTL_DEL, some_socket, NULL); // should it be called? will it cause error?
EPOLLOUT 事件被触发后,MAN 页面说该事件现在已被禁用,不会被触发。不知道是不是和EPOLL_CTL_DEL完全一样。 如果 EPOLLOUT | 关闭套接字时是否需要手动调用 EPOLL_CTL_DEL EPOLLONESHOT 是唯一被触发的事件吗?