Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Wed Jul 09, 2003 11:28 am Post subject: Multiple Download |
|
|
OK, I want to use vdsipp.dll to download 200 files.
I want to use eg. 10 threads.
How can i create and monitor the threads? Eg. if Thread 5 was finished, I would tell thread 5 to start downloading the next file in the list.
Can anyone offer any code, samples?
Nathan |
|
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed Jul 09, 2003 12:07 pm Post subject: |
|
|
You should use the 'onreceive' events (I don't know the real name right now ). This is just some basic code:
| Code: |
list create,downloadlist
list add,downloadlist,http://server/file1.exe
list add,downloadlist,http://server/file2.exe
list add,downloadlist,http://server/file3.exe
list add,downloadlist,http://server/file4.exe
list add,downloadlist,http://server/file5.exe
list add,downloadlist,http://server/file6.exe
list add,downloadlist,http://server/file7.exe
list add,downloadlist,http://server/file8.exe
list add,downloadlist,http://server/file9.exe
list add,downloadlist,http://server/file10.exe
list seek,0
internet download,1,@next(downloadlist),c:\downloaddir
internet download,2,@next(downloadlist),c:\downloaddir
internet download,3,@next(downloadlist),c:\downloaddir
:Evloop
wait event
goto @event()
:Internet 1 onreceive
internet download,1,@next(downloadlist),c:\downloaddir
goto Evloop
:Internet 2 onreceive
internet download,2,@next(downloadlist),c:\downloaddir
goto Evloop
:Internet 3 onreceive
internet download,3,@next(downloadlist),c:\downloaddir
goto Evloop |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|