[Twisted-Python] Limiting the number of connections

Miha Valencic miha.valencic at gmail.com
Sat Dec 8 17:17:50 MST 2012


Hi!

I have developed a simple twisted tcp server which does ldap lookups
as a result of user input. I would like to limit the number of
connections each listener (I have 4, each on its own port)  accepts. I
guess people usually want to accept as many connections as possible,
but I would like to limit them.

>From what I've read (a single post from 2009):
"As you observed, doing this on the server accepts and then
immediately closes the connection. There is no way to not accept the
connection. This is a limitation of the underlying platform APIs."

Is this still the case? We can't limit the number of accepted connections?

Regards,
 Miha.




More information about the Twisted-Python mailing list