From: Tony Arcieri Date: 2009-02-07T03:49:22+09:00 Subject: Re: How can an I use nonblocking I/O with openssl? --000e0cd3beb23dd5aa0462447d28 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Fri, Feb 6, 2009 at 11:45 AM, Yaxm Yaxm > wrote: > hello, > I am using ruby's imap library to connect to gmail via ssl. > But every now and then, my thread goes into sleep and never wakes up. > I suspect that the thread is waiting for I/O for reading. > > how can I make openssl use nonblocking i/o? > In my event library Rev (http://rev.rubyforge.org) I ended up effectively monkeypatching the C code in the Ruby OpenSSL extension in order to support non-blocking I/O: http://github.com/tarcieri/rev/blob/5f76c67996fd9076503072cf569ad935423e9d56/ext/rev/rev_ssl.c I for one would certainly appreciate a "real" solution to doing non-blocking SSL. -- Tony Arcieri medioh.com --000e0cd3beb23dd5aa0462447d28--