I need to create twisted SSH server that accepts several commands. But the main feature is that server should manage connection. To be more specific, it needs to close open connection if it lasts for more than 10 minutes (for example). Or it should not accept new connection if there are already 10 open connections.
In fact I still cannot fully understand how all these realms, avatars, protocol and portals, etc. interact with each other. And I feel strong lack of documentation. There are several examples, but without any comments about what exactly is happening on each step.
Anyway, trying and failing I was able to add execution of needed commands to twisted simple ssh server example. But I'm totally loss on how I can reject new connection or close existing or add some time flag for new connection that can be used to close connection when it reaches time limit.
Any help would be appreciated. Please be kind to me, I never worked with Twisted and actually I'm newby in python :)
Thank you.
p.s. I'm sorry for possible mistakes, English is not my native.