Hi,
> I have developed a simple server that uses epoll_wait with TCP
> sockets. The server program listens to incoming connections on
> listening socket and on acceptiong incoming connections adds them to
> the pollset to be waited upon by epoll_wait.
>
> I would like to know how can I produce a condition by which the event
> EPOLLHUP is generated and returned by epoll_wait for a socket fd ?
>
> Pls guide.
my guess would be that EPOLLHUP is the "epoll" version of POLLHUP...
for TCP socket, this means that the socket is half-closed as result of
a shutdown().
HTH,
Loïc
--
My Blog:
http://www.domaigne.com/blog
"One of the main causes of the fall of the Roman Empire was that–
lacking zero–they had no way to indicate successful termination of
their C programs." -- Robert Firth