I’ve came up with problem regarding unregistering protocols from reactor in twisted while application is running.
I use hardware modems connected to PC by USB and that’s why this scenario is so important for my solution.
Has anyone an idea how to do it?
Greets,
Chris
When you first call
reactor.listenon your protocol factory, it returns an object that implementsIListeningPort, see http://twistedmatrix.com/documents/8.2.0/api/twisted.internet.interfaces.IListeningPort.html — just save that object somewhere and when you want to stop listening on that protocol factori, call that object’sstopListeningmethod.I assume that
reactor.listenon the protocol factory is what you implicitly mean by “registering” a protocol (which logically should be what you’re trying to undo by “unregistering” it), if you mean something else please clarify exactly how you “register a protocol” and we’ll work out how to undo that!-)