[Twisted-Python] Implementing a new stream transport

Phil Budne phil at ultimate.com
Mon Apr 8 15:34:10 EDT 2013

I looked for, but haven't (yet) found any documentation on how
to implement a Twisted "transport"

For some testing and prototype work I'm doing I implemented the
proprietary TCP connection multiplexing protocol a customer of mine
uses as a Twisted Protocol and a transport for the "channels" that are
multiplexed inside the real TCP connection.

When I tried running a twisted.web.server.Site Protocol on my new
"channel" transport I found I was missing members and methods in the
transport class.

As a quick crock, I made my transport a subclass of
twisted.internet.tcp.Server, and got away with it, but I'd like to do
the right thing.

I'd be delighted to find out that mixins exist that would solve my
problem, but I'd be happy to know what interfaces I need to implement,
or even better where I find find documentation on how to implement a
new "transport", especially one that isn't file-descriptor based.


More information about the Twisted-Python mailing list