… | |
… | |
391 | AnyEvent offers. |
391 | AnyEvent offers. |
392 | |
392 | |
393 | =head2 Timers and other event sources |
393 | =head2 Timers and other event sources |
394 | |
394 | |
395 | So far, we have only used I/O watchers. These are useful mainly to find |
395 | So far, we have only used I/O watchers. These are useful mainly to find |
396 | out whether a Socket has data to read, or space to write more data. On sane |
396 | out whether a socket has data to read, or space to write more data. On sane |
397 | operating systems this also works for console windows/terminals (typically |
397 | operating systems this also works for console windows/terminals (typically |
398 | on standard input), serial lines, all sorts of other devices, basically |
398 | on standard input), serial lines, all sorts of other devices, basically |
399 | almost everything that has a file descriptor but isn't a file itself. (As |
399 | almost everything that has a file descriptor but isn't a file itself. (As |
400 | usual, "sane" excludes windows - on that platform you would need different |
400 | usual, "sane" excludes windows - on that platform you would need different |
401 | functions for all of these, complicating code immensely - think "socket |
401 | functions for all of these, complicating code immensely - think "socket |