[ANN] openssl-nonblock 0.1.0

T

Tony Arcieri

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

Hi folks,

I've seen various requests for non-blocking OpenSSL support. As a
maintainer of a non-blocking event library this was crucial for the stuff I
was doing. I developed a C extension which uses some pretty crazy hacks to
patch non-blocking support into the existing OpenSSL C extension.

As this can benefit people who aren't using my event library, I've gone
ahead and rolled this functionality into its own gem, which works on 1.8.6,
1.8.7, and 1.9.1:

github: http://github.com/tarcieri/openssl-nonblock/tree/master
rubyforge: http://rubyforge.org/frs/shownotes.php?release_id=31150

This gem adds an additional four methods to OpenSSL::SSL::SSLSocket:
connect_nonblock, accept_nonblock, read_nonblock, and write_nonblock. It
also adds an additional two exceptions: OpenSSL::SSL::ReadAgain and
OpenSSL::SSL::WriteAgain to handle cases where the system isn't ready to
perform the given I/O request.

I've seen some patches for this on the 1.9 Redmine (e.g.
http://redmine.ruby-lang.org/issues/show/814) but they aren't comprehensive
and don't address connect_nonblock and accept_nonblock.

I hope these issues get addressed by ruby-core eventually, but with this gem
you can have non-blocking SSL I/O today.

And if you're interested in non-blocking I/O in general, you might want to
check out my event framework:

http://rev.rubyforge.org/

Enjoy!
 

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,769
Messages
2,569,582
Members
45,059
Latest member
cryptoseoagencies

Latest Threads

Top