On 03 Feb 2003 22:00:08 -0800, Eric Rescorla wrote:

>David Schwartz <[EMAIL PROTECTED]> writes:

>>You nearly always need non-blocking, even if it's just for
>>timeouts.

>Depends. If you're just setting some global timeout, you
>can use blocking I/O perfectly well.

        There will almost always be race conditions involving exactly when
the signal was received or the timeout occured. If you have only one
connection and are willing to throw the program away if you have a
timeout, then fine. Otherwise, you're piling on kludges and you might
as well just do it right in the first place.

        Blocking I/O is suitable only when you are literally willing to wait
forever for I/O to take place. About the only totally safe
alternative with TCP is to call 'shutdown' from a signal handler. You
have a few other options in multithreaded code.

--
David Schwartz
<[EMAIL PROTECTED]>


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to