Delphi (Indy) TIdTCPClient in thread

2019-05-06 00:34发布

问题:

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:

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.



标签: delphi indy