well..I use a typical epoll + multithread model to handle massive sockets, i.e. I have a thread called epollWorkThread that uses epoll_wait to handle i / o sockets. Although there is an EPOLLIN event, recv () will do the job, and I use the noblocking mode to return immediately. And recv () is really after a while (true) loop. Everything is all right in the main time (maybe in a couple of hours or maybe minutes or if I’m lucky), I can get information. But after a while, recv () insists on returning -1 with errno = 107 (ENOTCONN). Another peer-to-peer transport is written in AS3, which provides a socket connection. Therefore, the behavior of recv () confuses me. Thank you in advance for any comment!
source share