address family not supproted by protocol error while connecting socket communication in android
<p>in my app i want to receive some message form the server and based on that i want to display pop up message and for this i want to do socket communication in android.</p>

<p>When i am try to read response form the server using socket.getInputstream i will get error 
"request time out :Address family not supported by the protocol"</p>

<p>Here is my code.</p>

<pre><code>        Socket socket = new Socket("localhost",62000));
        boolean isconnect = socket.isConnected();
        Log.e("Socket Connection ", String.valueOf(isconnect));
        // Read and display the response message sent by server application
        // 
        ObjectInputStream ois = new ObjectInputStream(socket.getInputStream());
        String message = (String) ois.readObject();
        System.out.println("Message: " + message);

        ois.close();
        socket.close();
</code></pre>
