Closed SuperShinyEyes closed 7 years ago
One of the main reasons is it makes a socket behave more like a file. You can for example iterate directly over the socket in stream mode.
async for line in s:
print(line)
Thanks @jkbbwr. I got it.
This is a question not an issue report.
I was following an echo server tutorial.
The same code in stream mode
In How-to, it says
But I don't see any clear reason/use-case/advantage of this stream mode. When should I use it? Thanks.