Download Management
-
Hi, Could anyone provide some pointers on download management concepts. The Download Management would essentially mean download acceleration, download resumption if connection fails etc. I would like to know how all this is done and any sample code if possible. Thanks and Regards, Abhishek. Learning is a never ending process of Life.
-
Hi, Could anyone provide some pointers on download management concepts. The Download Management would essentially mean download acceleration, download resumption if connection fails etc. I would like to know how all this is done and any sample code if possible. Thanks and Regards, Abhishek. Learning is a never ending process of Life.
Basically, it relies on the range capability of HTTP and the restart capability of FTP. For download acceleration (where this does not mean altering the configuration of the TCP/IP stack, which has happened to me a few times with this sort of software), the client requests different ranges on different connections. This gets around the bandwidth throttles that some sites apply on a per-connection basis. It can also sometimes help to have an additional connection if the first one stalls. Some accelerators communicate with their authors' website, to discover mirrors of the content (Go!Zilla used to do this). The download manager then connects to multiple mirror sites, dividing the content between them. The specification for HTTP/1.1 says, 'A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy.' Download accelerators often break this rule. Resuming a download is much the same - for HTTP, you set the Range header to start at the point that failed, while for FTP you use the REST command to indicate where you want to restart. However, the server may not understand the command - you may need to fall back to retrieving the whole. I believe the WinInet DLL does allow setting restart points, although I think you have to add to the headers (HTTP) or send the command explicitly (FTP). WinInet enforces the two connection limit mentioned above.
-
Basically, it relies on the range capability of HTTP and the restart capability of FTP. For download acceleration (where this does not mean altering the configuration of the TCP/IP stack, which has happened to me a few times with this sort of software), the client requests different ranges on different connections. This gets around the bandwidth throttles that some sites apply on a per-connection basis. It can also sometimes help to have an additional connection if the first one stalls. Some accelerators communicate with their authors' website, to discover mirrors of the content (Go!Zilla used to do this). The download manager then connects to multiple mirror sites, dividing the content between them. The specification for HTTP/1.1 says, 'A single-user client SHOULD NOT maintain more than 2 connections with any server or proxy.' Download accelerators often break this rule. Resuming a download is much the same - for HTTP, you set the Range header to start at the point that failed, while for FTP you use the REST command to indicate where you want to restart. However, the server may not understand the command - you may need to fall back to retrieving the whole. I believe the WinInet DLL does allow setting restart points, although I think you have to add to the headers (HTTP) or send the command explicitly (FTP). WinInet enforces the two connection limit mentioned above.
Thanks a lot Mike for your help. Could you suggest me some online resource where I can do a detailed study on this subject and where I can find some sample code on how exactly this can be done. I would be greatful if you could provide me with this info. Thanks Abhishek. Learning is a never ending process of Life.