![](https://secure.gravatar.com/avatar/8ab170b9b306906ab29f527a89806ff5.jpg?s=120&d=mm&r=g)
Andrew Bennetts wrote:
Have you seen http://twistedmatrix.com/pipermail/twisted-python/2002-December/002456.html
OMG! That answer one half of my question, thanks. Should of probe around first.
(In general, the best approach to Twistifying a protocol in another Python library is to reuse the message decoding and encoding, but use Twisted to handle all the networking. This usually means writing a Protocol subclass that delegates most of the work in dataReceived to the library, but obivously this depends on the protocol...)
So do you mean that twisted is the one sending out bytes to and from the network, and pass dataReceived to the library? This depends if the library has the encode and decode routines right? If the library does it's own networking, then I cannot do it this way, am I right in saying that?