commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <...@savarese.org>
Subject Re: Is FTPClient.retrieveFile thread safe?
Date Sun, 06 Apr 2008 02:21:13 GMT

In message <007101c895a4$bd365990$37a30cb0$@utsa.edu>, "Cory Burkhardt" writes:
>sections."  Since the retrieveFile method blocks until the download is
>complete, does that mean I cannot use this method from multiple threads and
>I am required to use the retrieveFileStream method to write the file
>manually instead?

You can't download multiple files concurrently over a single FTP connection,
so if you want to download files concurrently from multiple threads, you're
going to have to use a separate FTPClient instance/FTP connection per thread.
FTP is a serial (one file at a time) protocol.

daniel

o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o-o o-o-o-o-o-o-o-o-o-o-o-o-o-o
                    Igfip                      o    s a v a r e s e
The strategic alternative for online games(tm).o   software research
            http://www.igfip.com/              o http://www.savarese.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message