简体   繁体   中英

Indy TcpServer in Xe2 : working with hundreds of GPRS clients

I am working with an application for using in hundreds of GPRS devices, The server connects with clients and receives a information packets every 1 or 2 minutes. When packet is receceived, the server send a acknowledge packet. This is my questions:

1 - Indy server starts a thread for each connection automacticaly ? if so how do I manage those threads. 2 - How can I make a thread for each ouput package ? because the GPRS devices are slow to respond.

Thankfully Paulo Silas

Yes, Indy's TIdTCPServer creates a separate thread per client connection. You don't have to do anything to manage that behavior, it is automatic. You can create your own worker threads outside of Indy, just use the VCL's TThread class, or Indy's TIdThread or TIdThreadComponent` component. But in this case, I don't think it will be necessary, you don't need to use additional threads to send packets back to the devices.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM