ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/AnyEvent-FastPing/FastPing.pm
(Generate patch)

Comparing AnyEvent-FastPing/FastPing.pm (file contents):
Revision 1.9 by root, Sun Jan 16 11:48:15 2011 UTC vs.
Revision 1.10 by root, Sat Jan 29 23:55:37 2011 UTC

26use common::sense; 26use common::sense;
27 27
28use AnyEvent; 28use AnyEvent;
29 29
30BEGIN { 30BEGIN {
31 our $VERSION = '1.14'; 31 our $VERSION = '1.15';
32 our @ISA = qw(Exporter); 32 our @ISA = qw(Exporter);
33 33
34 require Exporter; 34 require Exporter;
35 #Exporter::export_ok_tags (keys %EXPORT_TAGS); 35 #Exporter::export_ok_tags (keys %EXPORT_TAGS);
36 36
143 143
144sub icmp_ping($$$&) { 144sub icmp_ping($$$&) {
145 _send_req _req_icmp_ping @_; 145 _send_req _req_icmp_ping @_;
146} 146}
147 147
148our $ICMP4_FH;
149our $ICMP4_W = (open $ICMP4_FH, "<&=$ICMP4_FD") && AE::io $ICMP4_FH, 0, \&_recv_icmp4; 148our $ICMP4_FH; our $ICMP4_W = $ICMP4_FD >= 0 && (open $ICMP4_FH, "<&=$ICMP4_FD") && AE::io $ICMP4_FH, 0, \&_recv_icmp4;
150our $ICMP6_FH;
151our $ICMP6_W = (open $ICMP6_FH, "<&=$ICMP6_FD") && AE::io $ICMP6_FH, 0, \&_recv_icmp6; 149our $ICMP6_FH; our $ICMP6_W = $ICMP6_FD >= 0 && (open $ICMP6_FH, "<&=$ICMP6_FD") && AE::io $ICMP6_FH, 0, \&_recv_icmp6;
152 150
153=item AnyEvent::FastPing::register_cb \&cb 151=item AnyEvent::FastPing::register_cb \&cb
154 152
155Register a callback that is called for every received ping reply 153Register a callback that is called for every received ping reply
156(regardless of whether a ping is still in process or not and regardless of 154(regardless of whether a ping is still in process or not and regardless of

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines