epoll_ctl (2) — Linux manual page - man7.org
EPOLLRDHUP is an event type that indicates the stream socket peer closed connection, or shut down writing half of connection. It is useful for writing simple code to detect peer shutdown when using edge-triggered moni...