File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,10 +12,16 @@ struct EpollEvents {
1212 static constexpr unsigned HANGUP = EPOLLHUP ;
1313 static constexpr unsigned READ_HANGUP = EPOLLRDHUP ;
1414
15+ /* *
16+ * Any kind of hangup, i.e. the normal EPOLLHUP plus the
17+ * Linux-specific EPOLLRDHUP.
18+ */
19+ static constexpr unsigned ANY_HANGUP = HANGUP |READ_HANGUP ;
20+
1521 /* *
1622 * A mask containing all events which indicate a dead socket
1723 * connection (i.e. error or hangup). It may still be
1824 * possible to receive pending data from the socket buffer.
1925 */
20- static constexpr unsigned DEAD_MASK = ERROR |HANGUP | READ_HANGUP ;
26+ static constexpr unsigned DEAD_MASK = ERROR |ANY_HANGUP ;
2127};
Original file line number Diff line number Diff line change @@ -10,10 +10,16 @@ struct PollEvents {
1010 static constexpr unsigned ERROR = POLLERR ;
1111 static constexpr unsigned HANGUP = POLLHUP ;
1212
13+ /* *
14+ * Any kind of hangup, i.e. the normal EPOLLHUP plus the
15+ * Linux-specific EPOLLRDHUP.
16+ */
17+ static constexpr unsigned ANY_HANGUP = HANGUP ;
18+
1319 /* *
1420 * A mask containing all events which indicate a dead socket
1521 * connection (i.e. error or hangup). It may still be
1622 * possible to receive pending data from the socket buffer.
1723 */
18- static constexpr unsigned DEAD_MASK = ERROR |HANGUP ;
24+ static constexpr unsigned DEAD_MASK = ERROR |ANY_HANGUP ;
1925};
Original file line number Diff line number Diff line change @@ -16,10 +16,16 @@ struct WinSelectEvents {
1616 static constexpr unsigned ERROR = 0 ;
1717 static constexpr unsigned HANGUP = 0 ;
1818
19+ /* *
20+ * Any kind of hangup, i.e. the normal EPOLLHUP plus the
21+ * Linux-specific EPOLLRDHUP.
22+ */
23+ static constexpr unsigned ANY_HANGUP = HANGUP ;
24+
1925 /* *
2026 * A mask containing all events which indicate a dead socket
2127 * connection (i.e. error or hangup). It may still be
2228 * possible to receive pending data from the socket buffer.
2329 */
24- static constexpr unsigned DEAD_MASK = ERROR |HANGUP ;
30+ static constexpr unsigned DEAD_MASK = ERROR |ANY_HANGUP ;
2531};
You can’t perform that action at this time.
0 commit comments