I’m reading Tutorial on Network Programming with Python, and in this document the author is saying that “The function sendall() should be used only with blocking sockets.”
But I do not see any such condition in the Python documentation, socket.sendall(string[, flags]).
Is the author of PyNet right?
When in doubt, check the source.
socket_sendallclearly gives up once send() returns -1, which it will do (with errno of EAGAIN or EWOULDBLOCK) if you call it on a non-blocking socket without calling poll() or select(). (And theinternal_selectfunction skips calling poll()/select() when the socket is non-blocking.)So I would say the PyNet author is correct.