How to track number of clients with Indy TIdTCPServer
问题 I want to know the number of current client connections to an Indy 9 TIdTCPServer (on Delphi 2007) I can't seem to find a property that gives this. I've tried incrementing/decrementing a counter on the server OnConnect/OnDisconnect events, but the number never seems to decrement when a client disconnects. Any suggestions? 回答1: The currently active clients are stored in the server's Threads property, which is a TThreadList . Simply lock the list, read its Count property, and then unlock the