rubyでlibeventを使うライブラリを書いてみた。 通常のeventも合わせてテスト全然してないお。 環境はruby1.9。1.8でも動くかな。 #include "ruby.h" #include <stdio.h> #include <sys/time.h> #include <event.h> VALUE mRubyEvent, mRubyEventConst, rb_cEvent, rb_cSignalEvent, rb_cTimerEvent; struct eventdata{ struct event ev; VALUE proc; }; static void frb_event_init(VALUE obj){ event_init(); } static void fevent_callback(int fd, short event, void *args) {