added a couple of lines to the Reget procedure, so that
it can support segmented downloading and resumption.
This adds 2 additional arguments
Reget {s source {dest ""} {from_bytes 0} {till_bytes
-1}
from_bytes and till_bytes to supply the starting and
ending offsets. Omission of till_bytes, leads to
downloading till the end of file.
Since both the new arguments have benign default
values, existing code should not break. However one
( good ?) side-effect is one cannot use this feature
without supplying a destination file.
multi segment download from the same server
Reget 0 README readme.1 20 120
Reget 0 README readme.2 120 220
Reget 0 README readme.1 220
multi segement download from different servers
Reget 1 README readme.1 20 120
Reget 2 README readme.2 120 220
Reget 3 README readme.1 220
for files which can be easily verified ( .rpm .deb ),
the multi segmented download may be used to speed up
downloads.
== from comp.lang.tcl==
Date: Sun, 27 May 2001 18:36:06 -0700
From: Jeffrey Hobbs <JeffH@ActiveState.com>
To: Sreangsu Acharyya <srean_list@myrealbox.com>
Newsgroups: comp.lang.tcl
Subject: Re: segmented, multi host download using
tcllib
Sreangsu Acharyya wrote:
...
> I needed the functionality of downloading a chunk
from a file from its start
> and end offset, including the feature of resuming an
aborted download.
> I just spent some 15 minutes on it. so its rough, but
if any one thinks this
> could be useful, i can send the patch file ( based on
tcllib 0.8 ) offline
This sounds interesting. Please do post it to the
tcllib patches
area, and one of the maintainers will look at it. If
you are
interested in further changes, I could add you to that
list and
you could work directly on the sources.
--
Jeff Hobbs The Tcl Guy
Senior Developer
http://www.ActiveState.com/
Tcl Support and Productivity Solutions
patch file to be applied on ftp.tcl of tcllib-0.8
Logged In: YES
user_id=75003
Enclosed an updated patch for this feature.
Updated patch, unified diff
Logged In: YES
user_id=75003
Patch committed to head.