[ANN] eventmachine 0.12.6

A

Aman Gupta

I am happy to announce the release of eventmachine 0.12.6

This release contains numerous bug fixes and improvements. Highlights inclu=
de:

=A0- EM::connection_count API to get number of active connections in the re=
actor
=A0- EM::get_max_timers API to get the max number of timers available
=A0 =A0 =A0(use EM::set_max_timers to increase it)
=A0- EM::Connection#get_status returns a Process::Status object
=A0- EM::attach can be used with pipes

=A0- Switched back to extconf for building extensions (prevents errors
during gem install)
=A0- Better windows support
=A0 =A0- fixed various win32 build issues in fastfilereader and
rubyeventmachine extensions
=A0 =A0- official 0.12.6 windows binary gem released on rubyforge
=A0 =A0- rake win32:gem task to build openssl and binary win32 gem
=A0- Better error reporting
=A0 =A0- raise ArgumentError when EM.connect/start_server are passed an
invalid handler class
=A0 =A0- friendlier error messages raised from the EM error_callback
=A0- Various solaris build issues fixed

=A0- Fixed HttpCli2 to handle basic auth and content-length:0 bodies
=A0- Fixed latency caused when cleaning up EM::popen'd processes
=A0- Fixed inactivity timeout bug in the pure ruby reactor
=A0- Fixed issues in the test suite due to improper kqueue fd
initialization/cleanup

=A0- Bundled memcache protocol

=A0 =A0 =A0EM.run{
=A0 =A0 =A0 =A0cache =3D EM::p::Memcache.connect 'localhost', 11211
=A0 =A0 =A0 =A0cache.delete:)a)
=A0 =A0 =A0 =A0cache.set:)a, 'hello')
=A0 =A0 =A0 =A0cache.get:)a){ |v| p v }
=A0 =A0 =A0}

=A0- Optional error handler for errors raised during event callbacks

=A0 =A0 =A0EM.error_handler{ |e|
=A0 =A0 =A0 =A0 =A0 =A0puts "Error raised during event loop: #{e.message}"
=A0 =A0 =A0}

=A0- EM::system wrapper for EM::popen

=A0 =A0 =A0EM.run{
=A0 =A0 =A0 =A0EM.system('ls'){ |out,status| puts out if status.exitstatus =
=3D=3D 0 }

=A0 =A0 =A0 =A0EM.system('sh', proc{ |process|
=A0 =A0 =A0 =A0 =A0process.send_data("echo hello\n")
=A0 =A0 =A0 =A0 =A0process.send_data("exit\n")
=A0 =A0 =A0 =A0}, proc{ |out,status|
=A0 =A0 =A0 =A0 =A0puts out
=A0 =A0 =A0 =A0})
=A0 =A0 =A0}

=A0- EM::next_tick can be used before the reactor is running

=A0 =A0 =A0EM.next_tick{ puts "The reactor was started at #{Time.now}" }
=A0 =A0 =A0sleep 2
=A0 =A0 =A0EM.run{}

=A0- EM::Connection now has an ssl_handshake_completed event

=A0 =A0 =A0require 'openssl'

=A0 =A0 =A0module SslHandler
=A0 =A0 =A0 =A0def post_init
=A0 =A0 =A0 =A0 =A0start_tls
=A0 =A0 =A0 =A0end
=A0 =A0 =A0 =A0def ssl_handshake_completed
=A0 =A0 =A0 =A0 =A0cert =3D get_peer_cert
=A0 =A0 =A0 =A0 =A0close_connection unless
OpenSSL::X509::Certificate.new(cert).subject =3D~ /Google/
=A0 =A0 =A0 =A0end
=A0 =A0 =A0end

=A0 =A0 =A0EM.run{
=A0 =A0 =A0 =A0EM.connect 'www.google.com', 443, SslHandler
=A0 =A0 =A0}

Special thanks to the following people for making this release possible:
=A0- Jake Douglas
=A0- Bob Potter
=A0- Ugo Riboni

The rdoc has been updated and is available at http://eventmachine.rubyforge=
org/

=A0Aman
 
R

Roger Pack

Wow and I thought EM dev. was dead :)

�- Better windows support
� �- fixed various win32 build issues in fastfilereader and
rubyeventmachine extensions

works well on mingw now.
� �- friendlier error messages raised from the EM error_callback

Wasn't there an error_callback before that was nixed because it hurt the
speed somewhat?

Thanks for doing all that other stuff.
-=r
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top