Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Mar : Re: Indy FTP
| Subject: | Re: Indy FTP |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Fri, 23 Mar 2007 11:33:01 |
"Arnau Font" <afont@nospam_really_ipssoft.com> wrote in message
news:46041815$1@newsgroups.borland.com...
> if I download large files or the download goes very slow (about
> 20 min of download), the thread hangs in that call (or looks like).
It is supposed to. Indy is a blocking library. What you describe is
by design.
> If it goes fine, I get the success message in the eventLog, but,
> sometimes (slow download, big files) I get no message
That is because you are not logging anything during the actual
transfer itself. You can use the OnWorkBegin, OnWork, and OnWorkEnd
events for that.
> so I guess that the thread is blocked in the Get call.
Yes.
> should I keep sending NOOPs to the server, even though
> I'm doing a GET?
That depends. It is not a requirement of the FTP protocol itself, but
it may be required if you are doing transfers through a proxy or
firewall. Transfers occur on a separate socket connection than the
one used for commands. Some proxies/firewalls close connections that
have been idle for a period of time.
TIdFTP does not support sending NOOPs during a transfer, though. You
could call WriteLn() from a separate thread, though. But keep in mind
that many servers do not support NOOPs during transfers, either.
Gambit