[Twisted-Python] Running a client within a thread... do I need to rewrite?

Andrew McClain andrew at fluther.com
Sat Nov 8 03:27:27 EST 2008


I have an existing twisted client connecting to a jabber server in order to
send notifications for our web app.
I'd like to fold in a STOMP message client into the my existing code, so I
can do something like this:

web app --> STOMP queue --> STOMP client --> jabber client --> jabber server

Problem is, the STOMP client library I'm using creates a socket, spawns a
thread, and listens, calling a callback method when it gets information.

In order to integrate this with my twisted jabber client, do I need to
rewrite the whole client using deferreds? Or could I use something like
defertothread to encapsulate the STOMP client?

Best, Andrew
-- 
--------
Tap the collective.
http://www.fluther.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20081108/7084e269/attachment.htm 


More information about the Twisted-Python mailing list