[Twisted-Python] How to do cleanup to server on sigint

Rob Mason rob.mason at ammeon.com
Tue Jan 31 06:43:02 EST 2006

Hi ,
I am using twisted to write a test client to interface with a server 
running a bespoke protocol.
The server expects interactions from the client something like:

If the server does not receive a specific unattach from the client , it 
will maintain a resource open for the client even though there is no 
Eventually the server will refuse additional connections (once it's 
number of 'open' connections exceeds some limit).

I want my client to be able to send an 'unattach' message before closing.

Is there a way I can override the default reactor behaviour in handling 
e.g. SIGINT so that I can force my client to send the unattach message 
before proceeding with normal reactor sigint handling?

Rob Mason

More information about the Twisted-Python mailing list