Hello, > > People thought that if they got a read hit on a listening socket, they > could then call accept without blocking. Oops, if the connection terminated > before they called accept, they blocked. They couldn't think of a way, but > they were not *guaranteed* there was no way. Thing are not as easy as you say (and they are changing). For example, on hpux when you get hint from select() on listening socket and in meantime client abort connection before server calls accept() than server process will get ENOBUFS in response to accept() - not hang. (ok - this may be not very intuitive but works this way). "aborted connection" may have two meanings: - abort by the client when full TCP handshake was done (for example by issuing close() on connect()'ed socket) and than you will get ENOBUFS - abort inside TCP 3-way handshake and in this case select() behaviour depends on system configuration: * select() return after first SYN (connection is delivered to application as soon as possible) * select() return after full 3-way TCP handshake (and we may have first case of "aborted connection)
This select() behaviour may be controlled from system. > This is how subtle bugs and corner cases bite you on the ass. You are right - thing may be very subtle. Best regards, -- Marek Marcola <[EMAIL PROTECTED]> ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List openssl-users@openssl.org Automated List Manager [EMAIL PROTECTED]