[issue32251] Add asyncio.BufferedProtocol
Antoine Pitrou
report at bugs.python.org
Fri Dec 8 05:51:32 EST 2017
Antoine Pitrou <pitrou at free.fr> added the comment:
I have another question: what happens if there is a partial read?
For example, let's says I return a 1024-bytes buffer in get_buffer(), but recv_into() receives data in 512 chunks. Is it:
1. getbuffer() is called, returns 1024 bytes buffer
2. recv_into() receives 512 bytes, writes them in buf[0:512]
3. recv_into() receives another 512 bytes, writes them in buf[512:1024]
or is it:
1. getbuffer() is called, returns 1024 bytes buffer
2. recv_into() receives 512 bytes, writes them in buf[0:512]
3. getbuffer() is called, returns another 1024 bytes buffer
4. recv_into() receives 512 bytes, writes them in newbuf[0:512]
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32251>
_______________________________________
More information about the Python-bugs-list
mailing list