|Subject:||TidFTP: OnWork -> How to identify the TIdFTP-Object in Event? (its NOT Sender)|
|Posted by:||Niki Bugarcici (Neik…@web.de)|
|Date:||Wed, 8 Oct 2003|
I hope ANYONE can point me to a direction with this problem. Thx in advance
for any help...
I am using Threads (in a Downloadmanager) where each Thread has its own
So you can download several FTP-Files at the same time.
All TIdFTP-Objects have the same "OnWork"-Event where I would update the
user about the progress.
The "OnWork"-Event will return a TIdTCPClient-Object and NOT a TIdFTP-Object
I need the TIdFTP-Object or a way to come from TIdTCPClient to the correct
(or any other way to identify the download correctly, even if more than 1
download is running from some host)
I tried (Sender as TIdFTP) - which crashes of course :(
I tried to find the correct Object by traversing all TidFTP-Objects and
comparing values with the "Sender"-Object.
(all times only ONE thread is running with one TIdFTP):
- Socket.Binding.Handle (this is different TIdTcpClient<->TidFTP even if
only ONE Thread running? eg. 552+556 is result... why?)
- Host (not usefull because you could download more than one file from a
- tag (NOT the same on both objects ; the TAG of TIdTCPClient is always 0)
So - I am running out of ideas now :(
Anyone any idea how to solve that?