You indicate a literal string "MY_PC_IP(SERVER_IP)" for the host name.  Is
that accurate, or do you mean you have an ip addr there?
 UnknownHostException means a failed dns lookup.  If you're using an ip
addr string, dns shouldn't be involved, but if you're using a host name it
probably means that host is not known to your dns server.  Are you running
your own dns server?

R


On Wed, Feb 6, 2013 at 5:52 AM, Ananda Krishna <
[email protected]> wrote:

> Hi,
> I am running a server which sends data to the client i.e android device
> with the help of sockets via wifi .On client side i am getting the
> following exception.
> *Exception: java.net.unknownhostexception unable to resolve host .*
>
> *Code:*
> *
> *
> clientSocket = new Socket("MY_PC_IP(SERVER_IP)",PORT);
> BufferedReader br = new BufferedReader(new
> InputStreamReader(clientSocket.getInputStream()));
> clientSocket.close();
>
> *Note : Both PC and the wifi connected android device is in the same
> network with proxy disabled for both PC and device.*
> *Any Suggestion in this regard would be appreciated.*
>
> Regards,
> AnandaKrishna S
>
>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to