I found my application run differently on G1 from Android emulator.

I used Ethereal to capture HTTP messages. I saw in both cases that the
server ended HTTP connection in 3 seconds after it finished sending
data.

Here is the related code snippet in my Android  application:

                        InputStreamReader  br=new BufferedReader(new 
InputStreamReader
(sock.getInputStream()));
                        String line;
                        while ((line=br.readLine())!=null)
                        {
                        ...code to process each line
                        }

When the code runs on Android emulator, the while loop exits almost
immediately after HTTP connection terminates.

However, when it runs on G1 phone, the while loop does not exit until
60+ seconds after TTP connection terminates.

Using G1,  have you experienced similar problem??? If you have, how
did you work around the problem?

Thanks in advance for any advice!!!


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to