dermesser / libsocket

The ultimate socket library for C and C++, supporting TCP, UDP and Unix sockets (DGRAM and STREAM) on Linux, FreeBSD, Solaris. See also my uvco library for a refreshed version!
https://borgac.net/~lbo/doc/libsocket/
Other
797 stars 195 forks source link

use Bitwise AND to detect new epoll events #86

Closed william9523 closed 12 months ago

william9523 commented 12 months ago

Hi,

When both EPOLLIN and EPOLLOUT events are configured for a epoll fd via epollset::add_fd(), both flag bit could be set in an IO event, thus we need to use Bitwise AND to be able to detect both of them.

dermesser commented 12 months ago

Thank you!