To provide backward compatibility with the previous version of
Net::Ping, a <A HREF="#item_pingecho"><CODE>pingecho()</CODE></A> subroutine is available with the same
functionality as before. <A HREF="#item_pingecho"><CODE>pingecho()</CODE></A> uses the tcp protocol. The
return values and parameters are the same as described for the <A HREF="#item_ping"><CODE>ping()</CODE></A>
method. This subroutine is obsolete and may be removed in a future
version of Net::Ping.
<P></P></DL>
<P>
<HR>
<H1><A NAME="warning">WARNING</A></H1>
<P><A HREF="#item_pingecho"><CODE>pingecho()</CODE></A> or a ping object with the tcp protocol use <A HREF="../../lib/Pod/perlfunc.html#item_alarm"><CODE>alarm()</CODE></A> to
implement the timeout. So, don't use <A HREF="../../lib/Pod/perlfunc.html#item_alarm"><CODE>alarm()</CODE></A> in your program while
you are using <A HREF="#item_pingecho"><CODE>pingecho()</CODE></A> or a ping object with the tcp protocol. The
udp and icmp protocols do not use <A HREF="../../lib/Pod/perlfunc.html#item_alarm"><CODE>alarm()</CODE></A> to implement the timeout.</P>
<P>
<HR>
<H1><A NAME="notes">NOTES</A></H1>
<P>There will be less network overhead (and some efficiency in your
program) if you specify either the udp or the icmp protocol. The tcp
protocol will generate 2.5 times or more traffic for each ping than
either udp or icmp. If many hosts are pinged frequently, you may wish
to implement a small wait (e.g. 25ms or more) between each ping to
avoid flooding your network with packets.</P>
<P>The icmp protocol requires that the program be run as root or that it
be setuid to root. The tcp and udp protocols do not require special
privileges, but not all network devices implement the echo protocol
for tcp or udp.</P>
<P>Local hosts should normally respond to pings within milliseconds.
However, on a very congested network it may take up to 3 seconds or
longer to receive an echo packet from the remote host. If the timeout
is set too low under these conditions, it will appear that the remote
host is not reachable (which is almost the truth).</P>
<P>Reachability doesn't necessarily mean that the remote host is actually
functioning beyond its ability to echo packets.</P>
<P>Because of a lack of anything better, this module uses its own
routines to pack and unpack ICMP packets. It would be better for a
separate module to be written which understands all of the different