lib/io/epoll.rb in io-epoll-0.1.0 vs lib/io/epoll.rb in io-epoll-0.2.0
- old
+ new
@@ -1,21 +1,25 @@
require 'io/epoll/epoll'
class IO
class Epoll
+ include Epoll::Constants
+
class << self
alias create new
end
+ alias length size
+
def add(io, events)
- ctl(CTL_ADD, io, events)
+ ctl CTL_ADD, io, events
end
def mod(io, events)
- ctl(CTL_MOD, io, events)
+ ctl CTL_MOD, io, events
end
def del(io)
- ctl(CTL_DEL, io)
+ ctl CTL_DEL, io
end
end
end