[Twisted-Python] how to delay the response in the protocol.Protocol
Andrzej Leszczynski
leszczynscy at yahoo.com
Thu Aug 11 11:36:35 MDT 2005
--- William Waites <ww at groovy.net> wrote:
> On Thu, Aug 11, 2005 at 10:16:14AM -0700, Andrzej
> Leszczynski wrote:
> > In the protocol derived class and dataReceived
> > function, I need to send response with given delay
> > using self.transport.write(str(msg)).
>
> how about reactor.callLater(delay,
> self.transport.write, str(msg))?
Will try that but this assumes that you know msg at
point of handling the dataReceived. The hidden part of
my question is that I would like to deffer/delay
processing the dataReceived in general becasue of a
few design reasons. This is why I asked about that
Deffered.
I learn Twisted, so sorry for simple question. Want to
have most Pythonic/Twisthonic solution.
Thx,
A.
More information about the Twisted-Python
mailing list