I know that if the remote host gracefully shuts down a connection, epoll
will report EPOLLIN
, and calling read
or recv
will not block, and will return 0 bytes (i.e. end of stream).
However, if the connection is not closed gracefully, and a write
or send
operation fails, does this cause epoll
to subsequently return EPOLLIN
for that socket, producing the same/similar end of stream scenario?
I've tried to find documentation on this behaviour, but have not succeeded, and while I could test it, I'm not interested in what happens on a specific distribution with a specific kernel version.