0
InetAddress.getByName(address).isReachable(timeout);

I am using this line to ping, and i wonder what is the propriate timeout to ping ? I use 1000 but it doesn't work properly than i changed to 2000?

mustafa
  • 109
  • 1
  • 3
  • 8
  • And did it work ith 2000? Yes: Your connection/computer is slow. No: Firewall(s)...? – deviantfan Feb 24 '14 at 10:03
  • See http://stackoverflow.com/questions/9922543/why-does-inetaddress-isreachable-return-false-when-i-can-ping-the-ip-address – m-szalik Feb 24 '14 at 10:11
  • There is a good article about isReachable method. http://bordet.blogspot.com/2006/07/icmp-and-inetaddressisreachable.html – m-szalik Feb 24 '14 at 10:22
  • it worked with 2000 and it sometimes works with 1000. Is there any way to make it 1000 or less ? – mustafa Feb 24 '14 at 16:14

0 Answers0