1

I want to ping many machines to obtain information of their reachability. Time is critical here and I dont want to wait 1-2 seconds for every machine (assuming that there are hundreds of them). I tried this code snippet and turns out that the isReachable method is synchronous.

InetAddress.getByName(host).isReachable(timeout);

I need a way to make either that method (if possible) nonblocking or come up with another solution that will help cut down the waiting time.

Any help would be greatly appreciated. Thanks in advance.

neziy
  • 93
  • 11

0 Answers0