Why do we need EPOLLRDHUP when EPOLLHUP seems enou

2019-06-22 16:28发布

According to the linux man page,

EPOLLHUP

When reading from a channel such as a pipe or a stream socket, this event merely indicates that the peer closed its end of the channel.

EPOLLRDHUP

Stream socket peer closed connection, or shut down writing half of connection.

I can hardly tell any difference between EPOLLHUP and EPOLLRDHUP.

To me, whenever EPOLLRDHUP is used EPOLLHUP can be used instead with the same semantics.

Am I right? If not, any explanations?

0条回答
登录 后发表回答