You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
socket.sendfile() should use TransmitFile on Windows #65920
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=Nonecreated_at=<Date2014-06-11.13:59:08.082>labels= ['type-feature']
title='socket.sendfile() should use TransmitFile on Windows'updated_at=<Date2014-06-13.01:18:54.619>user='https://github.com/giampaolo'
Copying my comment from the previous issue:
For TransmitFile support, the Windows function to turn an integer file descriptor into a WinAPI file HANDLE should be _get_osfhandle: http://msdn.microsoft.com/en-us/library/ks2530z6.aspx
This was mentioned on the previous issue as an issue with using TransmitFile because it was unclear how to convert a file object to a HANDLE compatible with TransmitFile; figured I'm copy over the note on the relevant API for the implementer so the research isn't done twice.
Activity
giampaolo commentedon Jun 11, 2014
This is a follow up of bpo-17552 which adds a new socket.sendfile() method taking advantage of high-performance os.sendfile() on UNIX.
The same thing could be done for Windows by using TransmitFile:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms740565(v=vs.85).aspx
MojoVampire commentedon Jun 13, 2014
Copying my comment from the previous issue:
For TransmitFile support, the Windows function to turn an integer file descriptor into a WinAPI file HANDLE should be _get_osfhandle: http://msdn.microsoft.com/en-us/library/ks2530z6.aspx
This was mentioned on the previous issue as an issue with using TransmitFile because it was unclear how to convert a file object to a HANDLE compatible with TransmitFile; figured I'm copy over the note on the relevant API for the implementer so the research isn't done twice.