Package uk.ac.manchester.spinnaker.utils
Class Ping
java.lang.Object
uk.ac.manchester.spinnaker.utils.Ping
How to ping a host to test for (ICMP) network connectivity.
- Author:
- Donal Fellows
- 
Method SummaryModifier and TypeMethodDescriptionstatic intPings to detect if a host or IP address is reachable.static intping(InetAddress address) Pings to detect if a host or IP address is reachable.
- 
Method Details- 
pingPings to detect if a host or IP address is reachable. May wait for up to about five seconds (or longer in extremis). Technically, it only detects if a host is reachable by ICMP ECHO requests; there are environments (such as Microsoft Azure) where ICMP ECHO is blocked but it is possible to route ordinary UDP packets.- Parameters:
- address- Where should be pinged.
- Returns:
- 0 on success, other values on failure (reflecting the result of the OS subprocess).
 
- 
pingPings to detect if a host or IP address is reachable. May wait for up to about five seconds (or longer in extremis). Technically, it only detects if a host is reachable by ICMP ECHO requests; there are environments (such as Microsoft Azure) where ICMP ECHO is blocked but it is possible to route ordinary UDP packets.- Parameters:
- address- Where should be pinged.
- Returns:
- 0 on success, other values on failure (reflecting the result of the OS subprocess).
 
 
-