<div dir="ltr">Hello,<br><br>I&#39;m hoping to use existing protocol implementations in twisted, but over a custom tunneling protocol that I&#39;ll call CTP for the remainder of this thread. CTP is basically TCP with a couple of strange characteristics. Besides a custom handshake, two actual tcp connections are used for the data transport, each of which is considered uni-directional; one connection is used for &quot;upstream&quot; and one for &quot;downstream&quot;. <br>
<br>I know how to create a twisted factory / protocol implementation for CTP such that you could write a CTP based protocol by inheriting from CTPProtocol and overriding the &quot;dataRead&quot; function. But this means I have to do more work to get each existing twisted protocol working with my CTP implementation.<br>
<br>So my question is, what is the best way to take an implementation of this protocol and integrate it tightly with twisted&#39;s internals? It seems like I would need a new reactor implementation with a listenCTP function, for one. Of course, I wouldn&#39;t want to just inherit from the SelectReactor, because I want to be able to use Epoll (or others) as well. <br>
<br>Please excuse my ignorance of twisted&#39;s architecture. I already have a prototype of this (see orbited 0.5.x) but I want my next release to integrate tightly with twisted&#39;s infrastructure instead of re-inventing an API on top. <br>
<br>-Michael Carter<br></div>