I'm trying to learn the proper way to implement a constantly running thread for an FTP Client application.

I'm trying to learn the proper way to implement a constantly running thread for an FTP Client application. I need run an Indy FTP client control (TIdFTP) in a thread. Being that the FTP control maintains a connection (login) to the server, the thread would need to be constantly running and execute "commands" (Dir list, Change dir, upload, etc). Do I simply create a system of looping in the Execute procedure and watch a property I create to know when to do things? I looked into TIdThreadComponent, but could not find any documentation.
I've done a bunch of searching, but the terms are so generic that I wasn't able to find the answer.
This is XE8, Firemonkey. Targets are Windows and OSX.

Comments