class Object

Constants

EM

EventMachine emulation for Cool.io:

require 'coolio/eventmachine'

Drawbacks: slightly slower than EM. Benefits: timers are more accurate using libev than using EM TODO: some things like connection timeouts aren't implemented yet DONE: timers and normal socket functions are implemented.

Public Instance Methods

cool_require(gem) click to toggle source
# File lib/cool.io/custom_require.rb, line 1
def cool_require(gem)
  begin
    m = /(\d+.\d+)/.match(RUBY_VERSION)
    ver = m[1]
    require "#{ver}/#{gem}.so"
  rescue LoadError
    require gem
  end
end