[issue17552] socket.sendfile()
akira
report at bugs.python.org
Tue Apr 22 01:34:51 CEST 2014
akira added the comment:
Should socket.sendfile() always return number of bytes sent because file.tell() may be changed by something else that uses the same file descriptor?
What happens if the file grows?
Instead of returning `(was_os_sendfile_used, os_sendfile_error)`, you could specify `no_fallback=False` that could be set to `True` to assert that the fallback is not used (with `no_fallback=True` the `os_sendfile_error` is raised instead of using socket.send() as a fallback).
If possible; always include number of bytes sent in any error that is raised.
----------
nosy: +akira
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17552>
_______________________________________
More information about the Python-bugs-list
mailing list