Hi,

I am wondering how to call coroutines within asyncio.Protocol.data_received:

http://stackoverflow.com/questions/20746619/calling-coroutines-in-asyncio-protocol-data-received/20748559

I am coming from Twisted, where doing asynchronous stuff within the 
corresponding callback ("dataReceived") is ok.

Now, Twisted does internal buffering of data incoming from a socket.

Am I supposed to do that myself and decouple the (asynchronous) processing 
via a receive queue and a Future to signal availability of received data?

Like so:

https://github.com/oberstet/scratchbox/blob/master/python/asyncio/client.py
https://github.com/oberstet/scratchbox/blob/master/python/asyncio/server.py

?

Thanks
/Tobias

Reply via email to