문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top