Skip to content

socket.sendfile() should use TransmitFile on Windows #65920

Open

Description

@giampaolo
BPO 21721
Nosy @gvanrossum, @pitrou, @giampaolo, @tiran, @asvetlov, @4kir4, @1st1, @MojoVampire

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 = None
closed_at = None
created_at = <Date 2014-06-11.13:59:08.082>
labels = ['type-feature']
title = 'socket.sendfile() should use TransmitFile on Windows'
updated_at = <Date 2014-06-13.01:18:54.619>
user = 'https://github.com/giampaolo'

bugs.python.org fields:

activity = <Date 2014-06-13.01:18:54.619>
actor = 'josh.r'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = []
creation = <Date 2014-06-11.13:59:08.082>
creator = 'giampaolo.rodola'
dependencies = []
files = []
hgrepos = []
issue_num = 21721
keywords = []
message_count = 2.0
messages = ['220270', '220410']
nosy_count = 12.0
nosy_names = ['gvanrossum', 'pitrou', 'giampaolo.rodola', 'christian.heimes', 'josiah.carlson', 'asvetlov', 'neologix', 'akira', 'rosslagerwall', 'python-dev', 'yselivanov', 'josh.r']
pr_nums = []
priority = 'normal'
resolution = None
stage = 'needs patch'
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue21721'
versions = ['Python 3.5']

Linked PRs

Activity

  1. giampaolo commented on Jun 11, 2014

    @giampaolo
    ContributorAuthor

    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

  2. MojoVampire commented on Jun 13, 2014

    MojoVampiremannequin
    Mannequin

    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.

  3. transferred this issue fromon Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtopic-socketRelated to the socket, socketserver and selectors modulestype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions