Pregunta

My question about epoll based non blocking event driven network IO is this - how does the client connection to the epoll service provider remain open? Why doesn't the connection on the client side die when there isn't a permanent receiver on the server side?

How can the client connection remain open (Keep-Alive on a POST) when the server has processed the request and supposedly moved on.

¿Fue útil?

Solución

Your assumption is wrong: there still is a permanent receiver on the server side.

Using epoll, select or plain blocking read/writes doesn't change anything on the networking side of things. There still is a persistent TCP session (in the case you state). The server process still has a file descriptor open on that connection.
epoll is "just" an API that allows the kernel to signal that there is stuff to do on that connection in an efficient, asynchronous manner.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top