[twsocket] Threaded FTP Client
Tue, 13 Jun 2000 15:50:28 -0500
personally it depends on the users of the resulting program. For instance, if
you want a commercial grade program, then you need to put them into seperate
threads, because let me give you an example:
Let's pretend you are downloading from a site that has a lot of nudy pics and
this site is hit heavily. WEll, a lot of times the server will THROTTLE the
speed at which you can download from the site. So for example, even though you
may have a 50K per second connection, maybe the server will only send the file
at 5K per second :) So, if you had 10 100K files, then it would take 100*10/5 =
200 seconds. Now let's say you SIMULTANIOUSLY downloaded them , ie: 10 at a
time, then EACH ONE COULD get downloaded at 5K per second, thus your total thru
put would be 50K per second :) And thus your total download time would be 20
seconds. Very rarely will you see a site that not only throttles the bandwidth
of a connection AND the bandwidth of the IP connection. Actually I have only
seen one site that did that. What that means is not amtter how many transfers
you have going, the server is smart enough to detect that they are all from you
(a single IP) and then throttles the entire bandwidht on you so that you only
get the 5K per second total.
P.S. So, basically, YES put them in seperate threads!
Sandy Ganz wrote:
> I may have made the question too complicated so here it is rephrased -
> I want to have several FTPCli components that download a list of required
> files, would it be better to put each one in a thread, or just create them
> and use them in sync mode and be done with it.
> Suggestions. I'm just making a program that will look at a queued list of
> FTP download requests and send them to the next available FTPCli component.
> TWSocket mailing list [http://elists.org/mailman/listinfo/twsocket]
> Visit our website at http://www.rtfm.be/fpiette/indexuk.htm