Thanks Jian. I am actually not sure if it is my protocol that is complicated or if the way in which I want to pass the data that is complicated. This is what I&#39;m doing.<br><br>I have two devices that both send and recieve binary strings. Each device formats the binary messages in a completely different manner, but abstractly, they basicly contain the same information just in different formats. I need to recieve the data, parse it, translate it, then repack it into this different raw format and send it to another destination. All this works just fine using asyncore dispatchers but I have created my own way of passing the messages between the different modules. Each module I have (parse, translate, pack, recieve, send) is wrapped by two Queue&#39;s, one taking input and the other taking output. I connect the modules by replacing one instance&#39;s output Queue with another&#39;s input Queue. This way each module is a thread that simply blocks on the input Queue. When the Parse instance finishes parsing data it puts it on the output Queue which is actually the Translate modules input Queue. Since everything needs to happen in a nice linear manner this works great. 
<br><br>But, this means I am not using callbacks or anything. Instead I would need to wrap the Twisted protocol in my Queue protocol. This seems straight forward enough, but I don&#39;t have much time to make this conversion (charge number is running out!) which is why I would love to see an example of the asyncore dispatcher to twisted protocol conversion. It would go along way to helping me quickly map my existing code to twisted style code.
<br><br>My reason&#39;s for switching to Twisted are for the future. This may need a web interface for configuration and monitoring in the near future. Also, asyncore has a myriad of issues on Win32 but we want the program to work on both *nix and windows, I&#39;m hoping Twisted helps. Furthermore, the Twisted libraries for making my system an application look very appealing as a means to ease deployment. 
<br><br>Thanks,<br><br>Sean<br><br><div><span class="gmail_quote">On 3/13/07, <b class="gmail_sendername">jian wu</b> &lt;<a href="mailto:hellojianwu@gmail.com">hellojianwu@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Sean,<br><br>I had some experience to write a simple python test simulator for my<br>java network<br>application using Apache Mina for a text line based protocol<br><br>At first I used asyncore.async_chat, then I moved to
<br>twisted.protocols.basic.LineReceiver<br>since I need async multi-thread behavior. For me, it is<br>straight-forward regarding handling the protocol when moving from<br>async_chat to LineReceiver.<br><br>And, asyncore.disptacher
 is just replaced with Twisted reactor and<br>Factory or TCPServer<br>if you want to write a Twisted Application.<br><br>If you have a very complicated protocol, it might be totally different<br>from my experience.<br><br>
Best regards,<br><br>Jian<br><br><br>On 3/12/07, Sean Roark &lt;<a href="mailto:srock258@gmail.com">srock258@gmail.com</a>&gt; wrote:<br>&gt; I would love to migrate my asyncore based applications to Twisted but the<br>&gt; learning curve seems quite steep. Anybody have a good tutorial? Migrating
<br>&gt; asyncore.dispatcher objects to twisted protocols examples would be awesome.<br>&gt;<br>&gt; --<br>&gt;<br>&gt; Sean Roark<br>&gt; _______________________________________________<br>&gt; Twisted-Python mailing list
<br>&gt; <a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>&gt; <a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
</a><br>&gt;<br>&gt;<br><br>_______________________________________________<br>Twisted-Python mailing list<br><a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br><a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python">
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br></blockquote></div><br><br clear="all"><br>-- <br><br>Sean Roark