https://bz.apache.org/bugzilla/show_bug.cgi?id=56188
--- Comment #22 from Yann Ylavic <[email protected]> --- (In reply to Luca Toscano from comment #21) > > 1) Would we get a EOF even when the client's TCP connection is in a state > like half-closed? (So basically doing a correct shutdown). Half-closed by whom (and which way)? A shutdown() for write sends a FIN to the peer, so a poll() there would return with POLLIN and/or POLLHUP (depending on the system), and read()/recv() returns 0 (EOF). It's still possible to poll()/read() an half-closed connection (shut down for write only), hence wait for the peer's data or FIN (read only connection). A shutdown() for read is not "visible" remotely, so it actually has little value (i.e. just stop reading). But I don't know how you'd like to use half-closing, so please clarify ;) > > 2) How many times is the POLLIN (registered to on the client's TCP > connection to detect disconnects) case executed for a "typical" POST > request? It seems like that code would get triggered for every incoming > group of bytes. Yes, poll() is woken up for each piece of data (or FIN) available in the socket, and until there is nothing more to read immediately (i.e. unless subsequent recv()s empty the socket, poll() won't block). So it depends on the size of the buffer used for reading, or if multiple nonblocking reads will empty the queue. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
