--- AnyEvent/README 2013/12/17 16:43:15 1.72 +++ AnyEvent/README 2016/01/27 18:15:21 1.76 @@ -1,8 +1,9 @@ NAME AnyEvent - the DBI of event loop programming - EV, Event, Glib, Tk, Perl, Event::Lib, Irssi, rxvt-unicode, IO::Async, - Qt, FLTK and POE are various supported event loops/environments. + EV, Event, Glib, Tk, UV, Perl, Event::Lib, Irssi, rxvt-unicode, + IO::Async, Qt, FLTK and POE are various supported event + loops/environments. SYNOPSIS use AnyEvent; @@ -845,6 +846,7 @@ AnyEvent::Impl::Event based on Event, very stable, few glitches. AnyEvent::Impl::Glib based on Glib, slow but very stable. AnyEvent::Impl::Tk based on Tk, very broken. + AnyEvent::Impl::UV based on UV, innovated square wheels. AnyEvent::Impl::EventLib based on Event::Lib, leaks memory and worse. AnyEvent::Impl::POE based on POE, very slow, some limitations. AnyEvent::Impl::Irssi used when running within irssi. @@ -986,7 +988,7 @@ transaction object or guard to let you cancel the operation. For example, "AnyEvent::Socket::tcp_connect": - # start a conenction attempt unless one is active + # start a connection attempt unless one is active $self->{connect_guard} ||= AnyEvent::Socket::tcp_connect "www.example.net", 80, sub { delete $self->{connect_guard}; ... @@ -1030,6 +1032,10 @@ function, which can reduce typing, codesize and can reduce the logging overhead enourmously. + AnyEvent::fh_block $filehandle + AnyEvent::fh_unblock $filehandle + Sets blocking or non-blocking behaviour for the given filehandle. + WHAT TO DO IN A MODULE As a module author, you should "use AnyEvent" and call AnyEvent methods freely, but you should not load a specific event module or rely on it. @@ -1360,7 +1366,7 @@ This variable can effectively be used for denial-of-service attacks against local programs (e.g. when setuid), although the impact is - likely small, as the program has to handle conenction and other + likely small, as the program has to handle connection and other failures anyways. Examples: "PERL_ANYEVENT_PROTOCOLS=ipv4,ipv6" - prefer IPv4 over @@ -1604,7 +1610,7 @@ ... }); - EV::loop; + EV::run; 3b. The module user could use AnyEvent, too: @@ -2121,12 +2127,13 @@ AnyEvent::Debug (interactive shell, watcher tracing). Supported event modules: AnyEvent::Loop, EV, EV::Glib, Glib::EV, Event, - Glib::Event, Glib, Tk, Event::Lib, Qt, POE, FLTK. + Glib::Event, Glib, Tk, Event::Lib, Qt, POE, FLTK, Cocoa::EventLoop, UV. Implementations: AnyEvent::Impl::EV, AnyEvent::Impl::Event, AnyEvent::Impl::Glib, AnyEvent::Impl::Tk, AnyEvent::Impl::Perl, AnyEvent::Impl::EventLib, AnyEvent::Impl::Qt, AnyEvent::Impl::POE, - AnyEvent::Impl::IOAsync, Anyevent::Impl::Irssi, AnyEvent::Impl::FLTK. + AnyEvent::Impl::IOAsync, AnyEvent::Impl::Irssi, AnyEvent::Impl::FLTK, + AnyEvent::Impl::Cocoa, AnyEvent::Impl::UV. Non-blocking handles, pipes, stream sockets, TCP clients and servers: AnyEvent::Handle, AnyEvent::Socket, AnyEvent::TLS.