
So far there are a couple use-cases for listening and connecting with IListeningPort/IConnector implementers that aren't in twisted.internet. Tv's SRV connector is one, IPv6 sockets is another. Currently it is cumbersome to use these, both because there are no convenience methods in reactor, and because if you want them to serialize properly you have to handle storing and restarting them yourself. Attached patch adds two methods to Application and two methods to the default reactor (they'll need to be put in an interface somewhere, too - I wasn't sure what the best place for them would be): listenWith and connectWith. These take a type object that implements IListeningPort and IConnector respectively, and then perform similar operations to the other listen and connect methods, including serialization and rebinding the ports on application startup. Also added to Application is unlistenWith, an awkwardly named function that causes a listening Port to stop listening. Jp -- Lowery's Law: If it jams -- force it. If it breaks, it needed replacing anyway. -- up 38 days, 23:48, 5 users, load average: 1.88, 1.70, 1.66