… | |
… | |
496 | static struct EVAPI *GEVAPI; |
496 | static struct EVAPI *GEVAPI; |
497 | }; |
497 | }; |
498 | |
498 | |
499 | struct iow : ev_io, evapi, callback<void (iow &, int)> |
499 | struct iow : ev_io, evapi, callback<void (iow &, int)> |
500 | { |
500 | { |
501 | static void thunk (struct ev_io *w_, int revents) |
501 | static void thunk (EV_P_ struct ev_io *w_, int revents) |
502 | { |
502 | { |
503 | iow &w = *static_cast<iow *>(w_); |
503 | iow &w = *static_cast<iow *>(w_); |
504 | |
504 | |
505 | w (w, revents); |
505 | w (w, revents); |
506 | } |
506 | } |
… | |
… | |
521 | |
521 | |
522 | void poll (int events); |
522 | void poll (int events); |
523 | |
523 | |
524 | void start () |
524 | void start () |
525 | { |
525 | { |
526 | ev_io_start ((ev_io *)this); |
526 | ev_io_start (EV_DEFAULT, (ev_io *)this); |
527 | } |
527 | } |
528 | |
528 | |
529 | void stop () |
529 | void stop () |
530 | { |
530 | { |
531 | ev_io_stop ((ev_io *)this); |
531 | ev_io_stop (EV_DEFAULT, (ev_io *)this); |
532 | } |
532 | } |
533 | |
533 | |
534 | ~iow () |
534 | ~iow () |
535 | { |
535 | { |
536 | stop (); |
536 | stop (); |