… | |
… | |
1829 | =item ev_io_init (ev_io *, callback, int fd, int events) |
1829 | =item ev_io_init (ev_io *, callback, int fd, int events) |
1830 | |
1830 | |
1831 | =item ev_io_set (ev_io *, int fd, int events) |
1831 | =item ev_io_set (ev_io *, int fd, int events) |
1832 | |
1832 | |
1833 | Configures an C<ev_io> watcher. The C<fd> is the file descriptor to |
1833 | Configures an C<ev_io> watcher. The C<fd> is the file descriptor to |
1834 | receive events for and C<events> is either C<EV_READ>, C<EV_WRITE> or |
1834 | receive events for and C<events> is either C<EV_READ>, C<EV_WRITE>, both |
1835 | C<EV_READ | EV_WRITE>, to express the desire to receive the given events. |
1835 | C<EV_READ | EV_WRITE> or C<0>, to express the desire to receive the given |
|
|
1836 | events. |
|
|
1837 | |
|
|
1838 | Note that setting the C<events> to C<0> and starting the watcher is |
|
|
1839 | supported, but not specially optimized - if your program sometimes happens |
|
|
1840 | to generate this combination this is fine, but if it is easy to avoid |
|
|
1841 | starting an io watcher watching for no events you should do so. |
1836 | |
1842 | |
1837 | =item ev_io_modify (ev_io *, int events) |
1843 | =item ev_io_modify (ev_io *, int events) |
1838 | |
1844 | |
1839 | Similar to C<ev_io_set>, but only changes the event mask. Using this might |
1845 | Similar to C<ev_io_set>, but only changes the event mask. Using this might |
1840 | be faster with some backends, as libev can assume that the C<fd> still |
1846 | be faster with some backends, as libev can assume that the C<fd> still |