How to limit the number of simultaneously connected clients
-
Just stop calling accept until the number of connections is below your threshold value again?
-
Based on needing to control the conections per client, you are going to need to establish who the connection is from. What is the clint that is connecting? Can you not manage your interface so that after accepting the connection they must send a message to establish the full session. That way they can [provide additional information so the server knows who is connecting.
Panic, Chaos, Destruction. My work here is done.
-
Based on needing to control the conections per client, you are going to need to establish who the connection is from. What is the clint that is connecting? Can you not manage your interface so that after accepting the connection they must send a message to establish the full session. That way they can [provide additional information so the server knows who is connecting.
Panic, Chaos, Destruction. My work here is done.
-
Why not just check the source IP? They could still try to spam halfopen connections, but they can't hope to get a connected TCP socket if they fake their source IP, so they won't spoof it if their goal is getting more connections.
in Apache done that I need, Apache accepting first 300 connections and then he stop accepting new connection before i destroy old connections i.e. it does not accept a new connection, and immediately disconnect, just an exception when i trying to do 301-th connection