EVFILTREAD
EVFILT_READ is a filter type used by the kqueue I/O event notification mechanism on BSD-derived systems, including macOS and FreeBSD. It monitors a file descriptor for readability, delivering an event when data is available to read without blocking. The filter may also indicate end-of-file, such as when the other end of a pipe or socket has closed.
When a kevent with EVFILT_READ is triggered, the event’s data field typically reports how much data is
Usage involves creating a kqueue, then registering the target file descriptor with EVFILT_READ using flags such
EVFILT_READ is commonly used for sockets, pipes, and other non-regular-file descriptors in event-driven I/O. It is