Delphi (Indy) TIdTCPClient in thread

微笑、不失礼 提交于 2019-12-07 07:17:55

问题


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.



来源:https://stackoverflow.com/questions/11753219/delphi-indy-tidtcpclient-in-thread

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!