[Twisted-Python] Arbitrary Port/Connector objects

Itamar Shtull-Trauring twisted at itamarst.org
Thu Jan 23 14:56:51 EST 2003

On Thu, 23 Jan 2003 14:19:03 -0500
Jp Calderone <exarkun at intarweb.us> wrote:

>   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.

I think the reactor implementations of the method should pass the
reactor as the first arg to the connectorType or listenType, e.g.:

+    def connectWith(self, connectorType, *args, **kw):
+        c = connectorType(self, *args, **kw)
+        c.connect()
+        return c

More information about the Twisted-Python mailing list