4
votes

All around the internet I see it appears to be commonly done to place a "TIdTCPClient" inside a custom TThread descendent... why is this done?

Sometimes I see the server in such a thread too...why?

Cheers, Adrian

1
Indeed, sorry about that. I was unaware of that feature. Will from now on!Adrian

1 Answers

7
votes

Indy uses blocking I/O, which is best handled in threads, and this is core to Indy's overall design. Blocking the main UI thread gives users the impression that the app is frozen when it really isn't. Have a look at "Introduction to Indy" for more information.