On Fri, 7 Feb 2003 22:27:51 +0200 (FLE Standard Time), Arne Ansper wrote: >I'm sorry. It seems to me that you made a small mistake in your >original >post or your definition of "non-blocking socket" is different than >other >peoples. > >You said: > >"It is almost always an error to use 'select' with non-blocking >sockets." > >All your arguments given in this letter and the next one indicate >that you >wanted to say: > >"It is almost always an error to use 'select' with blocking sockets." > >(And I completely agree with this one)
Hahaha. I can't believe I did that! Sorry about that. >> So what's the scenario where calling 'select' on a non-blocking >>socket is useful? All that happens is if you encounter an unusual >>situation where something changes in-between your call to 'select' >>and your call to 'read', 'write', 'accept', or whatever, your >>program >>stalls in the I/O function, possibly for a very long time. >This description fits exactly the situation when you call select on a >blocking socket. Kernel can remove the aborted connection from accept >queue and then accept will block. That why you want to use non- >blocking >sockets. I don't know what circuit mis-fired in my brain. Yes, I meant that using 'select' followed by an I/O operation on a *blocking* socket is a problem. Sorry for the noise and confusion. DS ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]