Dave Tolls wrote:Why are there two copies of this thread?
https://coderanch.com/t/662791/Android/Mobile/Software-caused-connection-abort-transferring
You need to time this from opening your connection to the exception being thrown.
Anything else is guesswork.
And the exception on that thread is coming from the client timing out, as far as I can tell.
Dave Tolls wrote:Why are there two copies of this thread?
https://coderanch.com/t/662791/Android/Mobile/Software-caused-connection-abort-transferring
You need to time this from opening your connection to the exception being thrown.
Anything else is guesswork.
And the exception on that thread is coming from the client timing out, as far as I can tell.
Dave Tolls wrote:How quickly does this timeout then?
Have you timed it (via logging possibly) from the opening of the connection in Activity_1 to the time out exception?
Les Morgan wrote:Were you able to change the timeout on both sides? The client and server suffer equally from congestion based problems. If the client thinks the server is dead, then it will reset too.
Dave Tolls wrote:This looks like your Android client is timing out.
You can find the timeout setting for our Socket using the getSoTimeout() method and compare that to how long your download is taking.
Les Morgan wrote:
Amit,
The problem is not unique to development, it happens all the time with off the shelf applications. What I have found is that you have enough congestion that your connection has to reset due to "lost packets". You can increase the time out, and that may help.
Les
Paul Clapham wrote:Another possibility is that the receiving application has simply stopped receiving the data, and disconnected from the socket. That's another meaning of "socket reset by peer". It can happen if the receiver has a Cancel button and a person sitting next to it who clicks on that button.
Les Morgan wrote:When I do this, I decide how many tiles I wish to display on the screen for my game, then see the size of the display area--you can get this within Toolkit API. Once I have the size of the screen it is an easy thing to divide the physical screen dimensions by the number of blocks I want along each axis. I truncate the math, integer math, and center my board in the middle of the screen.