How can an I use nonblocking I/O with openssl?

Y

Yaxm Yaxm

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?

here's another thread discussed about similar issue:
http://www.ruby-forum.com/topic/70716

Thanks.
Yaxm
 
T

Tony Arcieri

[Note: parts of this message were removed to make it a legal post.]

On Fri, Feb 6, 2009 at 11:45 AM, Yaxm Yaxm
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.
 
T

Tony Arcieri

[Note: parts of this message were removed to make it a legal post.]

On Fri, Feb 6, 2009 at 10:00 PM, Yaxm Yaxm
I am very interested in as I need IMAP ssl to use non-blocking i/o.

All right, well I released non-blocking OpenSSL support as a gem.

github repo here:
http://github.com/tarcieri/openssl-nonblock/tree/master

release announcement here:
http://www.nabble.com/-ANN--openssl-nonblock-0.1.0-to21885626.html

And now installable as "gem install openssl-nonblock"

Let me know if it works out for you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top