Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #10568
| From | Tom Anderson <twic@urchin.earth.li> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Theads and FTP |
| Date | 2011-12-06 21:07 +0000 |
| Organization | Stack Usenet News Service |
| Message-ID | <alpine.DEB.2.00.1112062047370.9866@urchin.earth.li> (permalink) |
| References | <5ltld7tfk710d84lkmv3rvcvd4g17bmak1@4ax.com> <NoRCq.5932$cN1.5824@newsfe12.iad> <4edc3535$0$282$14726298@news.sunsite.dk> <slrnjdpn11.fvg.avl@gamma.logic.tuwien.ac.at> <4edd8586$0$283$14726298@news.sunsite.dk> |
[Multipart message — attachments visible in raw view] - view raw
On Mon, 5 Dec 2011, Arne Vajhøj wrote: > On 12/5/2011 9:58 AM, Andreas Leitgeb wrote: >> Arne Vajhøj<arne@vajhoej.dk> wrote: >>> On 12/4/2011 4:14 PM, Daniel Pitts wrote: >>>> On 12/3/11 8:31 PM, Roedy Green wrote: >>>>> I have watched FTP voyager work. It seems to have at least two threads >>>>> simultaneously uploading downloading. You might think what's the >>>>> point. You can be transferring while you are waiting for the server >>>>> to open or close a file and send back confirmation. >>>>> I was wondering if this is done by logging on twice and having two >>>>> completely independent sessions, or if FTP itself has some multithread >>>>> ability. >>>> >>>> Why not look up the RFC on the FTP protocol? I seem to recall that it >>>> inherently uses two sockets, one for the commands and one for >>>> transfers. I don't know if the command stream is allowed (or >>>> expected) to be active during a transfer, I haven't read the spec >>>> myself in quite a while. Also, you don't necessarily need multiple >>>> threads to handle multiple connections. In posix c "select()" is use >>>> to manage multiple connections. >> >>> I believe it is possible to write a FTP client single threaded even >>> without select. >> >> Ok there's of course also poll(), and one could set all channels to >> non-blocking mode and do a more or less(with sleep) busy loop iterating >> through all the channels and see which of them have data... >> >> Did you mean one of these, or was it a serious statement? > > Serious. > > At least for some simple FTP client cases I believe it is possible for > the app to know what connection to read from when. Agreed. I am not aware of any requirement for either end to do anything to the control connection while a transfer is in progress, and while a transfer is not in progress, if there is a data connection, there is nothing that needs to be done to it. tom -- LEDERHOSEN IS NOT EDIBLE
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Theads and FTP Roedy Green <see_website@mindprod.com.invalid> - 2011-12-03 20:31 -0800
Re: Theads and FTP Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-12-04 13:14 -0800
Re: Theads and FTP Arne Vajhøj <arne@vajhoej.dk> - 2011-12-04 22:06 -0500
Re: Theads and FTP Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2011-12-05 14:58 +0000
Re: Theads and FTP Arne Vajhøj <arne@vajhoej.dk> - 2011-12-05 22:01 -0500
Re: Theads and FTP Tom Anderson <twic@urchin.earth.li> - 2011-12-06 21:07 +0000
Re: Theads and FTP Roedy Green <see_website@mindprod.com.invalid> - 2011-12-05 05:33 -0800
Re: Theads and FTP Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-12-05 09:29 -0800
Re: Theads and FTP Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-12-05 12:29 -0600
Re: Theads and FTP Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-12-06 11:28 -0600
Re: Theads and FTP Arne Vajhøj <arne@vajhoej.dk> - 2011-12-05 22:00 -0500
Re: Theads and FTP Tom Anderson <twic@urchin.earth.li> - 2011-12-06 22:16 +0000
Re: Theads and FTP Arne Vajhøj <arne@vajhoej.dk> - 2011-12-04 22:04 -0500
csiph-web