[Twisted-Python] writing back to the connection is blocking my code

glyph at divmod.com glyph at divmod.com
Wed Mar 19 15:20:02 MDT 2008


On 03:03 pm, coder_gus at lavabit.com wrote:
>Hi,
>I have a server that tries to write back to several clients after it 
>processed some that. I keep a hash with the currently connected clients 
>(protocol instances) and write back to those as soon as the workers 
>finish their job. The thing is I don't know where to call that 
>instance.writeDataToClient() to not block my code. (I have tried in 
>buildProtocol, but of course, it waits that another connection to be 
>made until it writes back).

It sounds like you might be having a problem answered by this FAQ 
question:

http://twistedmatrix.com/trac/wiki/FrequentlyAskedQuestions#HowdoImakeTwistedtalktomultipleclientsconnecttomultipleservers
or perhaps the following one.
>
>Thanks for All your help.
>
>
>_______________________________________________
>Twisted-Python mailing list
>Twisted-Python at twistedmatrix.com
>http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python




More information about the Twisted-Python mailing list