[android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-28 Thread Cydrike
Looks like a SSL problem after all ? Well, I've done more dumps. It appears that even when the connection is working, I can see this strange behavior of [RST]. The difference is that just after the [RST], a new [SYNC] is done and the connection works again. After going out of sleep mode there's

Re: [android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-28 Thread Kostya Vasilyev
Kinda reading between the lines in the first link you posted, I had a thought... Is your client sending more data in the HTTP request than the server expects? There are two more things I would try: - Shut down the output side of your connection on the Android side after you've sent the

[android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-28 Thread Cydrike
The request I make is from GET type, so I've no output and I think that it's not possible to send more data than expected. Correct me if I'm wrong. The request I make is exactly the same on Android and Windows Mobile and with WM, the server react correctly. The request seems to be good. Anyway,

Re: [android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-28 Thread Kostya Vasilyev
28.09.2010 19:48, Cydrike пишет: The request I make is from GET type, so I've no output and I think that it's not possible to send more data than expected. Correct me if I'm wrong. By calling socket.shutdownOutput you are specifically telling the SSL code that your application will not be

[android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-27 Thread Cydrike
I've looked at what's happening on the server. The server is as mobile, it doesn't see any closed connection. Here's what I've got from Wireshark: http://yfrog.com/j4tracekp The connection is started at the beginning [sync]. Then I put the mobile in sleep mode. It's awaken when we can see the

[android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-27 Thread Cydrike
I've looked at what's happening on the server. The server is as mobile, it doesn't see any closed connection. Here's what I've got from Wireshark: The connection is started at the beginning [sync]. Then I put the mobile in sleep mode. It's awaken when we can see the Encrypted Alert. Then a RST

Re: [android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-27 Thread Kostya Vasilyev
Looking at the Wireshark dump, it looks like the server begins to close the connection before the phone falls asleep: It's the FIN/ACK packet #212994 - highlighted in grey. The phone is supposed to send ACK (which it does) and then its own FIN/ACK, confirming the close (which it does not).

[android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-24 Thread Cydrike
There's nothing in logcat apart from garbage collector actions. I'm already listening to ConnectivityManager (ConnectivityManager.CONNECTIVITY_ACTION) and TelephonyManager (PhoneStateListener.LISTEN_DATA_CONNECTION_STATE) events to track network modifications. Nothing is caught when the problem

[android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-23 Thread Cydrike
Hello Kostya, I've tried what you said but my problem remains. I'm fact the problem only occurs when the device goes in sleep mode. If I let it connected to my PC (the screen never goes totally black), every thing is working fine. I've got a wakeLock in my application: final PowerManager pm =

Re: [android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-23 Thread Kostya Vasilyev
Does the server think it still has a valid connection at this point? -- Kostya Vasilyev -- http://kmansoft.wordpress.com 23.09.2010 14:00 пользователь Cydrike cedric.bruck...@gmail.com написал: Hello Kostya, I've tried what you said but my problem remains. I'm fact the problem only occurs when

Re: [android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-23 Thread Kostya Vasilyev
Oh, and check the logcat - I think you should see connection manager events at the time your connection goes bad. -- Kostya Vasilyev -- http://kmansoft.wordpress.com 23.09.2010 14:00 пользователь Cydrike cedric.bruck...@gmail.com написал: Hello Kostya, I've tried what you said but my problem

[android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-22 Thread Cydrike
New information: It seems that I don't receive Connection Reset by Peer errors because Android has dropped the connection. My exact test case is the following: - I start my application which creates the request with the previous posted code - the app reads the request response waiting for the

Re: [android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-22 Thread Kostya Vasilyev
Like I said before, detecting a broken connection on the receiving end is difficult, since TCP/IP does not have keep-alives. That's left up to the application protocol. Perhaps what you could do is have your application periodically send small amounts of data, just to make sure the

[android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-06 Thread Cydrike
Cloud 2 Device Messaging seems to be very interesting but I can't use it for many reasons. I've explicitly tested returned value of Read() method to detect -1. But it doesn't change anything. My application has been developed for Windows Mobile 6.5 too. Windows Mobile always detect the Connection

[android-developers] Re: Http chunked response and Connection Reset by Peer error

2010-09-06 Thread Cydrike
Cloud 2 Device Messaging seems to be very interesting but I can't use it for many reasons. I've explicitly tested returned value of Read() method to detect -1. But it doesn't change anything. My application has been developed for Windows Mobile 6.5 too. Windows Mobile always detect the Connection