> If I have 5 or more different weblinks in my queue, I want do 
> download all these files.
> Now I am using 5 components, but it doesn't seem very practical. 
> Basicly i have 5 of them called  DL1, DL2, DL3 , DL4 and DL5.
>  
> Is there an easier way to accomplish this? to use just like a
> HTTPMultipartdownloader[xx]  ?

HTTPMultipartdownloader is designed to download a very large single file
in several parts using multiple connections to the web server, and
assumes you have a lot of bandwidth.  

The normal THttpCli component is fine for most downloading, but don't
drop them on the form, instead create them in code as a array and assign
all the properties and events in code, using the same events for all
instances of the component (this is what HTTPMultipartdownloader does
itself).  

var
    MyHTTPCli: array [0..9] of THttpCli;
procedure onHttpDataEvent (Sender : TObject; Buffer : Pointer; Len :
Integer);
    procedure onHttpCommand (Sender: TObject; var S: String) ;
    procedure onHttpHeaderData (Sender : TObject);
    procedure onHttpSessionConnected (Sender : TObject);

for I := 0 to 9 do begin
    MyHTTPCli [I] := THTTPCli.Create (Self) ;
    with MyHTTPCli [I] do begin 
        Tag := I ;  // so we can identify each instance        
        OnDocData := onHttpDataEvent ;
        OnCommand := onHttpCommand ;
        OnHeaderData := onHttpHeaderData ;
        OnSessionConnected := onHttpSessionConnected ;
   
        etc, etc, 
    end ;
end ;

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to