• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Software caused connection abort when transferring File from java to android

 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm making a program which transfers a file. In the process of this method, I'm getting the written error:

"Connection reset by peer: socket write error" and "Software caused connection abort"

The file's size which I'm transferring is 96MB.

(clientSocket is SSLSocket)

Client:

Activity_1 Class:



Activity_2 Class:



Server:





Error on Server:






Error on Client:


What could cause this problem to occur?

Thanks in advanced.
 
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Amit Shef
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.




Thanks for replying.


My socket has already a timeout for his connection (7 seconds), but it still does not help.
 
Dave Tolls
Rancher
Posts: 4801
50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Amit Shef
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?



I set the Timeout at the beginning before I'm connecting to the socket.

For example:




I'm sorry for this inconvenience, but I don't know how to check how quickly will it timeout.
 
What do you have to say for yourself? Hmmm? Anything? And you call yourself a tiny ad.
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic