Send a file over a transport. Return the total number of bytes sent.
The method uses high-performance
os.sendfile() if available.
file must be a regular file object opened in binary mode.
offset tells from where to start reading the file. If specified, count is the total number of bytes to transmit as opposed to sending the file until EOF is reached. File position is always updated, even when this method raises an error, and
file.tell() can be used to obtain the actual number of bytes sent.
fallback set to
True makes asyncio to manually read and send the file when the platform does not support the sendfile system call (e.g. Windows or SSL socket on Unix).
SendfileNotAvailableError if the system does not support the sendfile syscall and fallback is
New in version 3.7.