6 Years
Discussion Span
Last Post by Cort3z

Have a time limit that you are willing to wait for the server.
Have the test fail if the server doesn't respond in that time limit.
That could return false values if the server does take longer than your limit.

Use ping to test if the server exists.


Now i have tried to use ping, but it seems it is much slower to use this ping method (isReachable() in InetAddress and another more scetchy method).I think the best bet is to put a time limit on the thing. Though the ping methods might be more consistant, they perform so much less on accually working links that I don't see the benefit.

Any idea on a resonable time limit? I got a good connection on my current location, basicly connected straight into the mainframe, so what would be the longes delay to where ever? 5 sec maybe?

This article has been dead for over six months. Start a new discussion instead.
Take the time to help us to help you. Please be thoughtful and detailed and be sure to adhere to our posting rules.