why does python socket library not include recvall() method like sendall()?
问题 When using recv() method, sometimes we can't receive as much data as we want, just like using send(). But we can use sendall() to solve the problem of sending data, how about receiving data? Why there is no such recvall() method? 回答1: There is no fundamental reason why such a function could not be provided as part of the standard library. In fact, there has been at least one attempt to add recvall(). Given that it can be easily implemented as a loop around recv() , I don't think that this is