RE: HTFTP: Support for resuming downloads with "REST" [patch]

"Tim Serong" <[email protected]>
Newsgroups gmane.comp.lib.libwww
Message-ID <[email protected]>
On Saturday, 15 March 2003 03:39, Sinha, Raj (Raj) wrote:
>
> I am sorry i did not catch the full discussion. But there
> is a discussion for our project to use libwww for downloading
> code into our embedded devices. 

I'm probably not the best one to ask, having only been working with
libwww for a couple of weeks.  The first thing that would scare me about
using libwww in an embedded device is memory footprint.  At a guess
(using my Windows box) the smallest I can easily make the libwww DLLs is
about 500 KB.  This is based on using wwwapp, wwwcache, wwwcore, wwwdir,
wwwdll, wwwfile, wwwhttp, wwwinit, wwwmime, wwwstream, wwwtrans and
wwwutils.

> Can you please provide me the best possible way to do this.
> What modules should i look into it. They want to usee http.
> can we take care of broken downloads and other such issues.

Try the Library Architecture and User's Guide at
http://www.w3.org/Library/User/
Also, take a look at chunk.c and LoadToFile.c in the Examples directory
for a starting point for downloading data given a URL.  Basically, you
do this:

- Initialize the library (HTProfile_newNoCacheClient)
- Set up a couple of callbacks and handlers 
- Create a new Request object (HTRequest_new)
- Start the request (HTLoadToFile or HTLoadToChunk)
- Go into an event loop
- Do something with the data when it has arrived.
- Clean up

Broken downloads can be handled by sending the request again, but give
it a range of bytes to download using HTRequest_addRange.  You should
probably check that the server supports "Accept-Ranges: bytes" before
doing this though.

Finally, if you haven't already done so, digging through the mailing
list archives can be quite illuminating.

Regards,

Tim Serong
-- 
[email protected]
http://www.conceiva.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.