--- AnyEvent-FastPing/FastPing.pm 2011/01/31 05:35:48 1.11 +++ AnyEvent-FastPing/FastPing.pm 2011/02/01 04:06:24 1.12 @@ -94,13 +94,30 @@ $p->interval (0); $p->max_rtt (0.5); #$p->add_range (v127.0.0.1, v127.255.255.254, 0); -$p->add_range (v1.0.0.1, v1.255.255.254, 0); +$p->add_range (v127.0.0.1, v127.0.0.1, 0); +#$p->add_range (v1.0.0.1, v1.255.255.254, 0); $p->on_idle (my $cv = AE::cv); my $cnt; $p->on_recv (sub { $cnt++; }); $p->start; + +{ + my $p = new AnyEvent::FastPing;#d# + $p->interval (0); + $p->max_rtt (0.5); + $p->add_hosts ([v0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2, (v0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.1)x8, v0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.3], 0); + my $cnt; + $p->on_recv (sub { + use Data::Dump; ddx \@_; + }); + $p->on_idle (sub { + undef $p; + }); + $p->start; +} + $cv->recv; warn $cnt; }