[issue10644] socket loses data, calling send()/sendall() on invalid socket does not report error and returns all bytes as written

diekmann report at bugs.python.org
Wed Dec 8 13:24:00 CET 2010


diekmann <diekmann at in.tum.de> added the comment:

> How could it work?
Before sending the actual data to the socket, send an empty packet to the socket and check if it is still alive. This may be a large performance issue on a lower level (if the connection is TCP, we want to wait for the ACK), but on a higher level, when using sendall() with larger arguments, it may be very convenient and the performance overhead may be barely noticeable.
I guess when using high-level functions like sendall(), the bare funcionality is preferred over this performance issue.

----------

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


More information about the Python-bugs-list mailing list