<div dir="ltr">ciao a tutti,<div>da alcune prove mi pare che il sendall spedisca effettivamente tutto il buffer anche su socket che abbiano <span style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:"JetBrains Mono",monospace;font-size:9.8pt">setblocking(</span><span style="font-family:"JetBrains Mono",monospace;font-size:9.8pt;color:rgb(204,120,50)">False</span><span style="background-color:rgb(43,43,43);color:rgb(169,183,198);font-family:"JetBrains Mono",monospace;font-size:9.8pt">)</span></div><div><br></div><div>Però non sono sicuro che sia un comportamento sempre garantito su tutte le piattaforme</div><div><br></div><div>La documentazione non si esprime in merito</div><div><a href="https://docs.python.org/3/library/socket.html#socket.socket.sendall">https://docs.python.org/3/library/socket.html#socket.socket.sendall</a><br></div><div><br></div><div>Qui si dice che la sendall dovrebbe essere usata solo con socket blocking:</div><div><a href="https://stackoverflow.com/questions/6240737/python-socket-sendall-function">https://stackoverflow.com/questions/6240737/python-socket-sendall-function</a></div><div>(c'è un riferimento dangling a sorgenti evidentemente obsoleti)</div><div><br></div><div>Ho visto i sorgenti del branch "main" e mi pare che invece la sendall spedisca sempre tutto...</div><div><a href="https://github.com/python/cpython/blob/main/Modules/socketmodule.c">https://github.com/python/cpython/blob/main/Modules/socketmodule.c</a><br></div><div><br></div><div>ad esempio qui</div><div><a href="https://github.com/python/cpython/blob/main/Modules/socketmodule.c#L925">https://github.com/python/cpython/blob/main/Modules/socketmodule.c#L925</a><br></div><div><br></div><div>Però diciamo che al sabato sera non mi sento abbastanza lucido da dirimere la questione da solo ;-)<br></div><div><br></div><div>Marco</div></div>