BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How can I get the event when the transfer is finished in FTP

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket)
View previous topic :: View next topic  
Author Message
Leo Zhang
Guest





PostPosted: Mon Mar 06, 2006 1:03 am    Post subject: How can I get the event when the transfer is finished in FTP Reply with quote



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?
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Mar 06, 2006 7:03 pm    Post subject: Re: How can I get the event when the transfer is finished in Reply with quote



"Leo Zhang" <zhangshile342 (AT) yahoo (DOT) com.cn> wrote in message
news:440b7b7f$1 (AT) newsgroups (DOT) borland.com...

Quote:
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
Back to top
Leo Zhang
Guest





PostPosted: Tue Mar 07, 2006 1:03 am    Post subject: Re: How can I get the event when the transfer is finished in Reply with quote



"Remy Lebeau \(TeamB\)" <no.spam (AT) no (DOT) spam.com> wrote:
Quote:

"Leo Zhang" <zhangshile342 (AT) yahoo (DOT) com.cn> wrote in message
news:440b7b7f$1 (AT) newsgroups (DOT) 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. Smile
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Tue Mar 07, 2006 4:03 am    Post subject: Re: How can I get the event when the transfer is finished in Reply with quote

"Leo Zhang" <zhangshile342 (AT) yahoo (DOT) com.cn> wrote in message
news:440cd498$1 (AT) newsgroups (DOT) borland.com...

Quote:
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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.