How to enumerate and kill the kept-alive connections using twisted.web.server ?
class Srv(Resource):
isLeaf = True
def __init__(self,port):
self.listener = reactor.listenTCP(port, Site(self))
def shutdown(self):
self.listener.stopListening()
## HOW TO ENUMERATE AND KILL OPEN CONNECTIONS
Update: For now, keeping transports in a set,and calling abortConnection() on them inside a try/except.