I would like the fastest and most accurate function boolean isReachable(String host, int port) that passes the following JUnit tests under the conditions below. Tim
boolean isReachable(String host, int port)
My most recent solution depends using a TimedSocket (source code) with 3000ms timeout while performing a connect.
TimedSocket
Timings:
testLocalHost()
testLAN()
Can't even get these to work properly:
testNoDNS()
testHaveDNS()