[Twisted-Python] Need some help with my first Twisted program

Jean-Paul Calderone exarkun at divmod.com
Fri Oct 19 17:07:26 EDT 2007

On Fri, 19 Oct 2007 16:53:00 -0400, "McCann, Brian" <bmccann at andmore.com> wrote:
> [snip]
>    def openShell(self, trans):
>        ep = EchoProtocol()
>        ep.makeConnection(trans)
>        trans.makeConnection(session.wrapProtocol(ep))
>    def eofReceived(self):
>        pass
>    def closed(self):
>        pass

Here, you implemented connection set up, invoking makeConnection on
the protocol you instantiated.  However, you didn't do anything similar
for connectionLost.  You may want to keep a list of the protocol
instances openShell creates and give them disconnection notification
in closed (which is being called in this example).


More information about the Twisted-Python mailing list