03-19-2013 06:35 AM
And of course the other option is the code for your 5-6 Threads, you do not actually close the connection completely.
You need to close the streams and the connection each time you go round the loop. A finally clause as part of the while loop which did it would probably do the job.
03-19-2013 08:10 AM
Yes I closed the all connection but totally working fine. I am using Mobile 2G data. Is there any reason speed of internet is slow so thread are stuck.
03-19-2013 08:39 AM
"...Is there any reason speed of internet is slow...."
Don't think that is a question that we can answer - it depends on your circumstances. Here is a list of questions that you might like to work through:
How fast is your 2G? How much data do you try to download? When you have tested this, how much throughput were you seeing with a single Thread? Did you try it with 2 Threads and then 3 and then 4 and so on to see where you got the best throughput? Why have you chosen 5-6? How are you sure that you are only using 5-6? What else is your phone doing at the same time? Does your phone support concurrent data and voice? Have you tried the various connection methods (WAP, direct TCP, WiFi etc) to see if there are any difference? How fast is your Server?
"... so thread are stuck"
Are they stuck?