Hello. I'm using the TServerSocket component in my Delphi application. I would like to limit client connections, let's say to one thousand. Unfortunately i don't know how to do that. The component does not provide any properties like 'MaxConnections' or any other like this one.
I create new server threads (TServerClientThread) using the OnGetThread event. To get the number of active connections I used the 'Socket.ActiveConnections' property.
Unfortunately I don't know what to do then. I tried not to create any thread inside the OnGetThread procedure when the number of connections is above the limit, but it changed nothing - client, even though it is unable to send or receive any information, it can connect to the server and stay connected. What to do not to allow new clients to connect or just allow them to connect but break the connection instantly?
Any help will be appreciated. Thanks, Mariusz.