I'm downloading a big file (say around 100mb) and I'm receiving SocketException: Read timed out
every now and then.
I'm thinking of raising the socket timeout. Actually, I'm thinking of setting the socket timeout to 0 (infinite) as eventually the sizes that the files that my app will be downloading may even go greater than 300mb, or even greater than 300mb. Is this a good practice?
Regarding socket timeout, when does the timeout countdown actually starts? I mean, when a socket timeout occurs, does it mean that the connection is still alive and file is still continously being downloaded but just timeouts because a socket timeout is configured? Or does the countdown starts when it figures that connection is still alive but no data is being sent by the server; thus countdown begins and reached the timeout?
Because if the case is the latter, then I'll not opting to go to infinite, since it will be caused by the server not sending me data and not by my app.