My linux application runs non-blocking TCP-syscall and then uses epoll_wait to detect the completion of a three-way handshake. Sometimes epoll_wait returns with the POLLOUT and POLLERR events specified for the same socket descriptor.
I would like to understand what is happening at the TCP level. I can not play it on demand. I assume that between the two calls to epoll_wait inside my event loop, we had the sequence SYN + ACK / ACK / FIN, but again I cannot play it.
linux tcp epoll
doccarcass
source share