I am happy to announce the release of eventmachine 0.12.6
This release contains numerous bug fixes and improvements. Highlights
include:
-
EM::connection_count API to get number of active connections in the
reactor -
EM::get_max_timers API to get the max number of timers available
(use EM::set_max_timers to increase it) -
EM::Connection#get_status returns a Process::Status object
-
EM::attach can be used with pipes
-
Switched back to extconf for building extensions (prevents errors
during gem install) -
Better windows support
- fixed various win32 build issues in fastfilereader and
rubyeventmachine extensions - official 0.12.6 windows binary gem released on rubyforge
- rake win32:gem task to build openssl and binary win32 gem
- fixed various win32 build issues in fastfilereader and
-
Better error reporting
- raise ArgumentError when EM.connect/start_server are passed an
invalid handler class - friendlier error messages raised from the EM error_callback
- raise ArgumentError when EM.connect/start_server are passed an
-
Various solaris build issues fixed
-
Fixed HttpCli2 to handle basic auth and content-length:0 bodies
-
Fixed latency caused when cleaning up EM::popen’d processes
-
Fixed inactivity timeout bug in the pure ruby reactor
-
Fixed issues in the test suite due to improper kqueue fd
initialization/cleanup -
Bundled memcache protocol
EM.run{
cache = EM::P::Memcache.connect ‘localhost’, 11211
cache.delete(:a)
cache.set(:a, ‘hello’)
cache.get(:a){ |v| p v }
} -
Optional error handler for errors raised during event callbacks
EM.error_handler{ |e|
puts “Error raised during event loop: #{e.message}”
} -
EM::system wrapper for EM::popen
EM.run{
EM.system(‘ls’){ |out,status| puts out if status.exitstatus == 0
}EM.system('sh', proc{ |process| process.send_data("echo hello\n") process.send_data("exit\n") }, proc{ |out,status| puts out })}
-
EM::next_tick can be used before the reactor is running
EM.next_tick{ puts “The reactor was started at #{Time.now}” }
sleep 2
EM.run{} -
EM::Connection now has an ssl_handshake_completed event
require ‘openssl’
module SslHandler
def post_init
start_tls
end
def ssl_handshake_completed
cert = get_peer_cert
close_connection unless
OpenSSL::X509::Certificate.new(cert).subject =~ /Google/
end
endEM.run{
EM.connect ‘www.google.com’, 443, SslHandler
}
Special thanks to the following people for making this release possible:
- Jake Douglas
- Bob Potter
- Ugo Riboni
The rdoc has been updated and is available at
http://eventmachine.rubyforge.org/
Aman
