 <p>Why? You only care if something is listening if you want to connect to it. So, connect to it, and handle the error. "Don't test, use." This applies to any resource. The best way to test whether it is available is to try to use it.</p>