|Subject:||Re: FTP Locks app/udp server|
|Posted by:||Remy Lebeau \(TeamB\) (firstname.lastname@example.org)|
|Date:||Mon, 4 Feb 2008|
"EricM" <buggy4…@hotmail.com> wrote in message
> Hi, i'm using an FTP client and a UDP server in one app. As soon as
> the FTP client starts uploading it's data the udp server becomes idle
> and doesn't reply to the clients anymore.
Are you using the FTP and UDP components in the same thread context? If so,
and if that is the main thread, then do you have the UDP server's
ThreadedEvent property set to False? If so, then that would explain why
your UDP server is blocked. TIdUDPServer uses TThread.Synchronize() to
trigger the OnUDPRead event handler when ThreadedEvent is False. While
TIdFTP is busy, the main message queue would be blocked from processing new
window messages until after TIdFTP is finished.
> Is there a simple way to fix this?
Assuming you are using them in the main thread, and ThreadedEvent is False,
then you would have to instantiate a TIdAntiFreeze as well.
> And would putting the ftp client in a different thread solve this?
FTP Locks app/udp server posted by EricM on Sat, 2 Feb 2008