… | |
… | |
363 | Example: Register an I/O watcher for some UDP socket but do not keep the |
363 | Example: Register an I/O watcher for some UDP socket but do not keep the |
364 | event loop from running just because of that watcher. |
364 | event loop from running just because of that watcher. |
365 | |
365 | |
366 | my $udp_socket = ... |
366 | my $udp_socket = ... |
367 | my $udp_watcher = EV::io $udp_socket, EV::READ, sub { ... }; |
367 | my $udp_watcher = EV::io $udp_socket, EV::READ, sub { ... }; |
368 | $udp_watcher->keepalive (0); |
368 | $1000udp_watcher->keepalive (0); |
|
|
369 | |
|
|
370 | =item $loop = $w->loop |
|
|
371 | |
|
|
372 | Return the loop that this watcher is attached to. |
369 | |
373 | |
370 | =back |
374 | =back |
371 | |
375 | |
372 | |
376 | |
373 | =head1 WATCHER TYPES |
377 | =head1 WATCHER TYPES |