ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.460 by root, Wed Jan 22 02:00:13 2020 UTC vs.
Revision 1.462 by root, Wed Jan 22 13:06:53 2020 UTC

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
1833Configures an C<ev_io> watcher. The C<fd> is the file descriptor to 1833Configures an C<ev_io> watcher. The C<fd> is the file descriptor to
1834receive events for and C<events> is either C<EV_READ>, C<EV_WRITE> or 1834receive events for and C<events> is either C<EV_READ>, C<EV_WRITE>, both
1835C<EV_READ | EV_WRITE>, to express the desire to receive the given events. 1835C<EV_READ | EV_WRITE> or C<0>, to express the desire to receive the given
1836events.
1837
1838Note that setting the C<events> to C<0> and starting the watcher is
1839supported, but not specially optimized - if your program sometimes happens
1840to generate this combination this is fine, but if it is easy to avoid
1841starting 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
1839Similar to C<ev_io_set>, but only changes the event mask. Using this might 1845Similar to C<ev_io_set>, but only changes the event mask. Using this might
1840be faster with some backends, as libev can assume that the C<fd> still 1846be faster with some backends, as libev can assume that the C<fd> still
4260method. 4266method.
4261 4267
4262For C<ev::embed> watchers this method is called C<set_embed>, to avoid 4268For C<ev::embed> watchers this method is called C<set_embed>, to avoid
4263clashing with the C<set (loop)> method. 4269clashing with the C<set (loop)> method.
4264 4270
4271For C<ev::io> watchers there is an additional C<set> method that acepts a
4272new event mask only, and internally calls C<ev_io_modfify>.
4273
4265=item w->start () 4274=item w->start ()
4266 4275
4267Starts the watcher. Note that there is no C<loop> argument, as the 4276Starts the watcher. Note that there is no C<loop> argument, as the
4268constructor already stores the event loop. 4277constructor already stores the event loop.
4269 4278

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines