Марк Коренберг added the comment:
Also I recommend you to use asyncio streams, instead of reinventing wheels.
So, reading your command will look like:
data = await stream.read_exactly(4)
(len,) = unpack(">I", data)
command = await stream.read_exactly(len)
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue27386>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com