Why not have a recvall method?

陶青云 qingyun.tao at tophant.com
Sun Feb 4 08:26:16 EST 2018


Hello, all  
The socket object has a `sendall` method that can send all bytes you specified.  
Oppositely, socket only has a recv method. I wonder why there is not a `recvall` method?  
To workaround this, I use `f = socket.makefile('rb')`, then all `f.read(n)` 
Thanks.


More information about the Python-list mailing list