I am working on a network programming using epoll. I was wondering how I can handle client disconnect. I read api document and epoll_wait had a argument for timeout. However, I was confused if the time out for the epoll_wait function or for the client that are being connected.
Thanks in advance..
timeout specified is for epoll_wait. To handle client disconnect, Handle EPOLLHUP raised by epoll and also check if the recv function on socket returns zero that means socket is disconnected.