🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.socket
4 messages
4 total messages Started by Leo Zhang Sun, 05 Mar 2006 22:59
How can I get the event when the transfer is finished in FTP?
#2650
Author: Leo Zhang
Date: Sun, 05 Mar 2006 22:59
2 lines
1084 bytes
Hi all. I'm developing a FTP server using Indy FTP Server. I want to do sth on the server as soon as the file uploading is finished. How can I capture this event? 
Re: How can I get the event when the transfer is finished in FTP?
#2651
Author: Remy Lebeau (TeamB)
Date: Mon, 06 Mar 2006 18:29
15 lines
1505 bytes
"Leo Zhang" <zhangshile342@yahoo.com.cn> wrote in message
news:440b7b7f$1@newsgroups.borland.com...

> Hi all. I'm developing a FTP server using Indy FTP Server. I
> want to do sth on the server as soon as the file uploading is
> finished. How can I capture this event?

There currently is no event available for that.  The only option is to
derive your own TStream class, instantiate it in the OnStoreFile event,
track what you need to while the file is being streamed, and then finally do
what you need to when the stream is being destroyed.


Gambit
Re: How can I get the event when the transfer is finished in FTP?
#2660
Author: Leo Zhang
Date: Mon, 06 Mar 2006 23:32
21 lines
1748 bytes
"Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> wrote:
>
>"Leo Zhang" <zhangshile342@yahoo.com.cn> wrote in message
>news:440b7b7f$1@newsgroups.borland.com...
>
>> Hi all. I'm developing a FTP server using Indy FTP Server. I
>> want to do sth on the server as soon as the file uploading is
>> finished. How can I capture this event?
>
>There currently is no event available for that.  The only option is to
>derive your own TStream class, instantiate it in the OnStoreFile event,
>track what you need to while the file is being streamed, and then finally do
>what you need to when the stream is being destroyed.
>
>
>Gambit
>
>

I think I may get a solution. There is a property "DataChannelThread" in TIdFTPServerThread, and I can handle its OnStopped. I tried and it seemed OK. :-)
Re: How can I get the event when the transfer is finished in FTP?
#2661
Author: Remy Lebeau (TeamB)
Date: Tue, 07 Mar 2006 03:23
18 lines
1728 bytes
"Leo Zhang" <zhangshile342@yahoo.com.cn> wrote in message
news:440cd498$1@newsgroups.borland.com...

> I think I may get a solution. There is a property "DataChannelThread"
> in TIdFTPServerThread, and I can handle its OnStopped.

The only problem with that approach is that you won't be told why the thread
is being stopped.  It could be for a successful transfer, but then again it
could also be for a failed transfer, as well as an aborted transfer.  There
is simply no way for your even handler to know which situation is actually
the case.

Also, that approach can only be applied to Indy 9.  Starting with Indy 10,
TIdFTPServer does not use separate threads to perform transfers anymore.


Gambit
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads