com.dalsemi.nethack
Class Ping

java.lang.Object
  |
  +--com.dalsemi.nethack.Ping

public class Ping
extends java.lang.Object

A class that can be used to ping nodes on a network.


Method Summary
static boolean pingNode(java.net.InetAddress addr)
          Pings the given ip address.
static int pingNode(java.net.InetAddress addr, int count)
          Pings the specified node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

pingNode

public static int pingNode(java.net.InetAddress addr,
                           int count)
Pings the specified node.
Parameters:
addr - - ip address to be pinged.
count - - number of times to ping.
Returns:
- the number of packets received.
See Also:
InetAddress

pingNode

public static boolean pingNode(java.net.InetAddress addr)
Pings the given ip address.
Parameters:
addr - ip address to be pinged.
Returns:
true if a response is received.
See Also:
InetAddress