mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
using transmitfile for sendfile on windows
This commit is contained in:
parent
f94935df16
commit
87c88faa88
2 changed files with 3 additions and 0 deletions
|
|
@ -514,6 +514,8 @@ def sendfile(self, file, offset=0, count=None):
|
|||
The socket must be of SOCK_STREAM type.
|
||||
Non-blocking sockets are not supported.
|
||||
"""
|
||||
if sys.platform == "win32":
|
||||
return self._sendfile_use_transmitfile(file, offset, count)
|
||||
try:
|
||||
return self._sendfile_use_sendfile(file, offset, count)
|
||||
except _GiveupOnSendfile:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue