HTTrack Website Copier
Free software offline browser - FORUM
Subject: Re: Writing to ARC format
Author: Xavier Roche
Date: 11/17/2003 23:01
 
> > - 'receive-header'
> That one isn't included by default, but only if 
HTS_ANALYSTE
> is != 0 -- but setting that kills main().

You do NOT have to recompile httrack to plug callbacks!!
The only thing to compile is the very small .c file you 
will make using the example provided!

> Can I trust that the htsblk passed to receive-header is 
not
> deallocated before the corresponding call to
> transfer-status? Is it perhaps the same htsblk in both 
cases?
Yes it is - at least the last htsblk address passed by 
receive-header is the same as the transfer-status one.

> How can I get the IP corresponding to the address?
This is not possible yet - but I will add two members to 
the htsblk structure:
  SOCaddr address;       // IP address
  int     address_size;  // IP address structure length

SOCaddr can be either sockaddr_in, sockaddr_in6, or 
sockaddr depending on the size

> Where's the actual content passed to transfer-status?
- If the 'adr' member of the htsblk structure is != NULL, 
adr is the address of the buffer and 'size' its size (the 
htsblk structure is the r member of the lien_back 
structure - that is, back->r.adr and back->r.size)
- Else, the 'url_sav' member of the lien_back structure is 
the destination file of the stored URL (you'll have to do a 
fopen(r->url_sav, "rb") to fetch the file)

Note: lien_back is defined in htscore.h

> Is the size field in lien_back the one sent by the server?
No - this one is 'totalsize'. 'size' is the size 'seen' 
(downloaded) by httrack.

There are many other useful things in the structures - ask 
me if necessary.

The .h files are a bit messy - I will definitely have to 
extract relevant (especiallt htsblk/lien_back structures) 
data to put them in a separate file one day.

 
Reply Create subthread


All articles

Subject Author Date
Writing to ARC format

11/14/2003 17:58
Re: Writing to ARC format

11/16/2003 09:30
Re: Writing to ARC format

11/17/2003 15:53
Re: Writing to ARC format

11/17/2003 23:01
Re: Writing to ARC format

11/18/2003 14:40
Re: Writing to ARC format

11/18/2003 17:21
Re: Writing to ARC format

11/18/2003 20:27
Re: Writing to ARC format

11/18/2003 20:39




1

Created with FORUM 2.0.11