Schmorpforge Software Repository

AnyEvent

Piratenpartei
Deliantra Free MMORPG
The free as in beer, liberal, code & content retro-style graphical MMORPG :)

AnyEvent

This module offers a simple API for I/O, timer, signal, child process and completion events, independent of a specific event loop.

Blurb

This module allows module authors to use those events internally without forcing users of the module to use a specific event loop, without adding noticable overhead. Currently supported event loops are EV, Event, Glib/Gtk2, Tk, Qt, Event::Lib, Irssi, IO::Async and POE (and thus also WxWidgets and Prima). It also comes with a very fast (see benchmarks in the main manual page) Pure Perl event loop and doesn't rely on XS, which ensures that your program will always run even when no C-based event loop is available.

In addition to the event core (which might be all you need), AnyEvent comes with an optional, fully asynchronous, pure-perl DNS resolver library supporting UDP, TCP and EDNS0, with many utility functions to "just resolve" stuff without having to instantiate even a resolver object (and including an equivalent of C).

The AnyEvent::Socket offers utility functions to make handling TCP connections (100% non-blocking, including DNS resolution, with both IPv4 and IPv6) and addresses as easy as possible, to the point of making IPv6 completely transparent.

Lastly, AnyEvent::Handle offers a powerful framework for asynchronous and buffered protocol handling. You can push multiple read event handlers to parse your protocol and start TLS/SSL negotiation transparently (and fully non-blocking) at any time, in both server and client mode.

Resources

CVSBrowsable CVS module 'AnyEvent'
CVSAnonymous CVS:  cvs -z3 -d :pserver:anonymous@cvs.schmorp.de/schmorpforge co AnyEvent
CPANFile Releases (CPAN)
LISTMailing List 'anyevent'
IRCServer irc.schmorp.de, channel #schmorpforge, user schmorp (say hi and wait a few minutes or hours)

Additional Documents

PODMain Manual Page
PODIntroduction/Tutorial
PODAE
FILEChanges
PODAnyEvent::IO
PODAnyEvent::Util
PODAnyEvent::Handle
PODAnyEvent::Socket
PODAnyEvent::DNS
PODAnyEvent::Impl::EV
PODAnyEvent::Impl::Event
PODAnyEvent::Impl::Glib
PODAnyEvent::Impl::Tk
PODAnyEvent::Impl::Perl
PODAnyEvent::Impl::Qt
PODAnyEvent::Impl::EventLib
PODAnyEvent::Impl::Irssi
PODAnyEvent::Impl::IOAsync
PODAnyEvent::Impl::POE