[Twisted-Python] writing back to the connection is blocking my code
coder_gus at lavabit.com
Thu Mar 20 04:23:16 EDT 2008
Ok, this link answered a few of my questions (stupid of me that I
haven't looked on that before I posted), but my question still stands:
how do I send data to a client whenever I want from wherever I want and
that data to be send as fast as possible, without the code waiting for
the reactor to answer to some events? Sorry for being too pushy but I am
not getting the picture right and I really want to get what's going on
glyph at divmod.com wrote:
> On 03:03 pm, coder_gus at lavabit.com wrote:
>> 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
> or perhaps the following one.
>> Thanks for All your help.
>> Twisted-Python mailing list
>> Twisted-Python at twistedmatrix.com
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> Click for quotes on adjustable mortgages.
More information about the Twisted-Python