From: Tony Arcieri Date: 2008-02-08T05:38:57+09:00 Subject: Re: Non-blocking SSL handshake ------=_Part_13299_803513.1202416742479 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline After investigating the issue some more, it appears that this is impossible without a C extension. The ossl_start_ssl() function in ossl_ssl.c, which is used by both OpenSSL::SSL::SSLSocket#connect and #accept, contains a loop which calls SSL_connect() or SSL_accept() repeatedly. If either of these functions needs the socket to be in a readable or writable state, rb_io_wait_readable() or rb_io_wait_writable() is called, blocking the application. Has there been any consideration as to adding something like OpenSSL::SSL::SSLSocket#connect_nonblock and #accept_nonblock to go along with Socket#connect_nonblock and Socket#accept_nonblock? -- Tony Arcieri ClickCaster, Inc. tony@clickcaster.com ------=_Part_13299_803513.1202416742479--