Hi all,
    I'm working at an application about network and faced some
problem.I did a client which will send some data to the server.But, if
the server is not open, my client will in trouble. Here is the code
and exact state:
try{
            Socket netSocket = new Socket("10.0.2.2", 9001);      /
*Problem is in this line*/
/*
At this line, when I try to create a socket binding to the local PC,
the program will pause for very long time(almost 5 mins) and then go
to IOExcption handling code where shows "The operation timed
out.".When the server in my local PC is running, everything is OK.I
need the program can response immediately, can anyone help me?
*/
                                ......
                                 }
                catch (UnknownHostException e)
                {
                        Log.d("SoControl", "UnknownHostException : " +
        e.getLocalizedMessage());
                }
                catch (IOException e)
                {
                        Log.d("SoControl", "IOException : " +
e.getLocalizedMessage());
                }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to