[issue21819] Remaining buffer from socket isn't available anymore after calling socket.recv the first time

Charles-François Natali report at bugs.python.org
Sun Jun 22 08:40:56 CEST 2014


Charles-François Natali added the comment:

> I'm wondering how would it be possible then to fetch packets of an unknown size without using an extremely big buffer.

IP packets are limited to 64K, so just pass a 64K buffer, that's not
"extremely big".
If you really wanted to avoid this, you could try the FIONREAD ioctl,
but I wouldn't advise it.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21819>
_______________________________________


More information about the Python-bugs-list mailing list