I am developing a file download utility using MFC. This utilty uses the CHttpFile class to download the file in chunks of 5096bytes. Sometimes due to network outage the download fails. However after gaining network connectivity I want the utility to resume download from where it was interrupted. The utility knows how many bytes it has downloaded previously and calls the Seek() method to reset the pointer while resuming download. But the issue is after calling Seek() method and then calling the Read() method takes a lot of time to return. The return time is longer if the file downloaded previously is around 20MB approx and it increases proportionally as the file size increases. Any idea how to resolve this??
NOTE: Upon resuming download, I open a new internet session. Could this be the culprit?
Thanks in advance...