AnyEvent
view release on metacpan or search on metacpan
lib/AnyEvent/Handle.pm view on Meta::CPAN
=head1 NAME
AnyEvent::Handle - non-blocking I/O on streaming handles via AnyEvent
=head1 SYNOPSIS
use AnyEvent;
use AnyEvent::Handle;
my $cv = AnyEvent->condvar;
my $hdl; $hdl = new AnyEvent::Handle
fh => \*STDIN,
lib/AnyEvent/IO.pm view on Meta::CPAN
This works with disk files, and even with sockets and other sources. It
is, however, not very efficient when used with sources that could be
driven in a non-blocking way, because it usually has higher overhead
in the OS than non-blocking I/O, because it ties memory buffers for a
potentially unlimited time and often only a limited number of operations
can be done in parallel.
That's why asynchronous I/O makes most sense when confronted with disk
files, and non-blocking I/O only makes sense with sockets, pipes and
similar streaming sources.
=head1 IMPORT TAGS
By default, this module exports all C<aio_>xxx functions. In addition,
the following import tags can be used:
:aio all aio_* functions, same as :DEFAULT
:flags the fcntl open flags (O_CREAT, O_RDONLY, ...)
=head1 API NOTES
lib/AnyEvent/Intro.pod view on Meta::CPAN
handle that provides queueing and buffering of incoming and outgoing data
for you.
It also implements the most common data formats, such as text lines, or
fixed and variable-width data blocks.
=head2 L<AnyEvent::Socket>
This module provides you with functions that handle socket creation
and IP address magic. The two main functions are C<tcp_connect> and
C<tcp_server>. The former will connect a (streaming) socket to an internet
host for you and the later will make a server socket for you, to accept
connections.
This module also comes with transparent IPv6 support, this means: If you
write your programs with this module, you will be IPv6 ready without doing
anything special.
It also works around a lot of portability quirks (especially on the
windows platform), which makes it even easier to write your programs in a
portable way (did you know that windows uses different error codes for all
( run in 0.280 second using v1.01-cache-2.11-cpan-4d50c553e7e )