The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MYDan::Util::MIO::TCP - Make multiple TCP connections in parallel.

SYNOPSIS

 use MYDan::Util::MIO::TCP;

 my $tcp = MYDan::Util::MIO::TCP->new( qw( host1:port1 host1:port2 ... ) );
 my $result = $tcp->run( max => 128, log => \*STDERR, timeout => 300 );

 my $mesg = $result->{mesg};
 my $error = $result->{error};

METHODS

run( %param )

Make TCP connections in parallel. The following parameters may be defined in %param:

 max : ( default 128 ) number of connections in parallel.
 log : ( default STDERR ) a handle to report progress.
 timeout : ( default 300 ) number of seconds allotted for each connection.
 input : ( default from STDIN ) input buffer.

Returns HASH of HASH of nodes. First level is indexed by type ( mesg or error ). Second level is indexed by message.