Handling client Creation failiers
<p>I am creating a android client app to connect to my server using the following code</p>

<pre><code>Socket socket = new Socket(MYIP, PORT);
</code></pre>

<p>When the server is available it works well , but when the server is not available i want to tell <strong>No server found.</strong>  But unfortunately no any exceptions are thrown and my application freezes. </p>

<p>What is the recommended way to handle this task</p>
