René's URL Explorer Experiment


Title: gh-65920: Implement `socket.sendfile` with `TransmitFile` on Windows by aisk · Pull Request #112337 · python/cpython · GitHub

Open Graph Title: gh-65920: Implement `socket.sendfile` with `TransmitFile` on Windows by aisk · Pull Request #112337 · python/cpython

X Title: gh-65920: Implement `socket.sendfile` with `TransmitFile` on Windows by aisk · Pull Request #112337 · python/cpython

Description: Using the Overlapped.TransmitFile in _overlapped module to implement socket.sendfile; Add Overlapped.getresultex to implement the timeout functionality, which have almost the same codes as exists Overlapped.getresult, just with diffenernt arguments. I split the Overlapped.getresult in to another function to share the codes. And some thought on os.sendfile: #102898 (comment) Issue: gh-65920

Open Graph Description: Using the Overlapped.TransmitFile in _overlapped module to implement socket.sendfile; Add Overlapped.getresultex to implement the timeout functionality, which have almost the same codes as exists O...

X Description: Using the Overlapped.TransmitFile in _overlapped module to implement socket.sendfile; Add Overlapped.getresultex to implement the timeout functionality, which have almost the same codes as exists O...

Opengraph URL: https://github.com/python/cpython/pull/112337

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:95ad7446-cb6f-0e7b-5e57-77da4871143f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDC34:16C3D3:61E0725:89C2B96:6A5021B6
html-safe-nonce3784076285aba2573ab2cdec018448748c0c0dc9f6409cc54beb7a01b0ef6c21
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzM0OjE2QzNEMzo2MUUwNzI1Ojg5QzJCOTY6NkE1MDIxQjYiLCJ2aXNpdG9yX2lkIjoiMzY4Njc0MTQ5OTkzNDk0MTYyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb9fe23448faf3b305be0b8d06c73eba4abb46315549235fbcb8a70baf9933210
hovercard-subject-tagpull_request:1614567302
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/112337/files
twitter:imagehttps://avatars.githubusercontent.com/u/699636?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/699636?s=400&v=4
og:image:altUsing the Overlapped.TransmitFile in _overlapped module to implement socket.sendfile; Add Overlapped.getresultex to implement the timeout functionality, which have almost the same codes as exists O...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonea08040246389072795e3b4e7b33c6d9a0c564eee02e829a809326d67c418b069
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
released1b91b18e7330fc458dfd824c61eaed7daa830d6
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/112337/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F112337%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F112337%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/112337/files
Reloadhttps://github.com/python/cpython/pull/112337/files
Reloadhttps://github.com/python/cpython/pull/112337/files
Please reload this pagehttps://github.com/python/cpython/pull/112337/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/112337/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.6k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
aiskhttps://github.com/aisk
python:mainhttps://github.com/python/cpython/tree/main
aisk:windows-socket-sendfilehttps://github.com/aisk/cpython/tree/windows-socket-sendfile
Conversation 8 https://github.com/python/cpython/pull/112337
Commits 20 https://github.com/python/cpython/pull/112337/commits
Checks 50 https://github.com/python/cpython/pull/112337/checks
Files changed 7 https://github.com/python/cpython/pull/112337/files
gh-65920: Implement socket.sendfile with TransmitFile on Windows https://github.com/python/cpython/pull/112337/files#top
Show all changes 20 commits https://github.com/python/cpython/pull/112337/files
490df91 add socket._sendfile_use_transmitfile aisk Nov 23, 2023 https://github.com/python/cpython/pull/112337/commits/490df91637b86087b6017d8d104f3f10791cc429
f94935d add Overlapped.getresultex to implement timeout in sendfile aisk Nov 23, 2023 https://github.com/python/cpython/pull/112337/commits/f94935df1632812e866c2a27de557433b07bf3ad
87c88fa using transmitfile for sendfile on windows aisk Nov 23, 2023 https://github.com/python/cpython/pull/112337/commits/87c88faa88c33cdc927868a09025ab23f77c0208
3f7259f fix tests aisk Nov 23, 2023 https://github.com/python/cpython/pull/112337/commits/3f7259fa7dbba7bc81e076f9e7da6ac4d65e0b22
619ef22 skip tests on non windows platforms aisk Nov 23, 2023 https://github.com/python/cpython/pull/112337/commits/619ef2205fdaf69b5c50bc65dd0203d86faf907c
19dde50 fix generated file aisk Nov 23, 2023 https://github.com/python/cpython/pull/112337/commits/19dde50495b71c22ffb1566f645966c74f8eacca
3dd3bc1 Merge branch 'main' into windows-socket-sendfile aisk Nov 23, 2023 https://github.com/python/cpython/pull/112337/commits/3dd3bc1c89098fe1e75731e9eab70025237e14eb
a4ce9df Merge branch 'main' into windows-socket-sendfile erlend-aasland Jan 6, 2024 https://github.com/python/cpython/pull/112337/commits/a4ce9dfa36ce38a5c3d5f0b3c268a5c6ef19c8f9
77deb6e Update Misc/NEWS.d/next/Windows/2023-11-23-22-25-16.gh-issue-65920.6w… aisk Jan 7, 2024 https://github.com/python/cpython/pull/112337/commits/77deb6e7156800ff41ac56e6bbf09cf00788c6f7
47eb386 Update Lib/socket.py aisk Jan 7, 2024 https://github.com/python/cpython/pull/112337/commits/47eb386d7d7bb688eeecb99e4507a714b496a976
8bd91bb Merge branch 'main' into windows-socket-sendfile aisk Apr 24, 2024 https://github.com/python/cpython/pull/112337/commits/8bd91bb15db3e9fb4bac5938aa03d3fcd5aadabb
b153f22 Merge remote-tracking branch 'origin/main' into windows-socket-sendfile aisk Dec 2, 2025 https://github.com/python/cpython/pull/112337/commits/b153f22afe551407c31b83c6ab71eb633a9056c4
048f6a1 Call TransmitFile in chunk aisk Mar 1, 2026 https://github.com/python/cpython/pull/112337/commits/048f6a14131a70c3b85a6dfb861836e26fae7f54
d6ed576 Merge remote-tracking branch 'upstream/main' into windows-socket-send… aisk Mar 1, 2026 https://github.com/python/cpython/pull/112337/commits/d6ed576fcb3113175f08fcc8ed9bbb391484a2b5
6edf90f Fix news entry aisk Mar 1, 2026 https://github.com/python/cpython/pull/112337/commits/6edf90fe572e68794177d379e82a2934b75a5940
f2de502 Fallback if _overlapped is not usage aisk Mar 1, 2026 https://github.com/python/cpython/pull/112337/commits/f2de5026a8536f7ad31ab02217cede9cfc532f02
deee263 Update generated files aisk Mar 1, 2026 https://github.com/python/cpython/pull/112337/commits/deee263ac2e48c01977ee98032c2f939af73659d
1a92bfc Merge remote-tracking branch 'upstream/main' into windows-socket-send… aisk Jun 26, 2026 https://github.com/python/cpython/pull/112337/commits/1a92bfcc80e12f484ad13a1c7034890bbbe467f3
63d384b Fix file position on error and fallback in socket.sendfile aisk Jun 27, 2026 https://github.com/python/cpython/pull/112337/commits/63d384b1f05efcc5d131a6323a3e303767b236bb
76e9bc8 Update sendfile docs and add getresultex docstring aisk Jun 27, 2026 https://github.com/python/cpython/pull/112337/commits/76e9bc8391297e226351ac536b6f6bd2b1072805
Clear filters https://github.com/python/cpython/pull/112337/files
Please reload this pagehttps://github.com/python/cpython/pull/112337/files
Please reload this pagehttps://github.com/python/cpython/pull/112337/files
socket.rst https://github.com/python/cpython/pull/112337/files#diff-e9e93d6b76a8a1cf0825d557b12e7ce3e67081cad650063eee520b81fd651943
3.16.rst https://github.com/python/cpython/pull/112337/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
socket.py https://github.com/python/cpython/pull/112337/files#diff-081d33d48e9390350bb1ef860c52de799d1647b58e33b07173ae2549532cbfbe
test_socket.py https://github.com/python/cpython/pull/112337/files#diff-ce79808e12f7a252c1747c23ba11810d4dc22ce0af4b9419bac647ad3a2a8389
2023-11-23-22-25-16.gh-issue-65920.6wWsHN.rst https://github.com/python/cpython/pull/112337/files#diff-dc907510d7e9976b886a38aedba78d7235600439b56a8bbba5425e8aaaae1081
overlapped.c.h https://github.com/python/cpython/pull/112337/files#diff-bbfab8a5415fa3f7072bdd200ebf79f1bb8290fa6b0fb26771c7e950ebb19dfe
overlapped.c https://github.com/python/cpython/pull/112337/files#diff-c2b25616ea65bee7385cf794c70c41497c8953b56ceb9eed382fb1cb2ca799c2
Doc/library/socket.rsthttps://github.com/python/cpython/pull/112337/files#diff-e9e93d6b76a8a1cf0825d557b12e7ce3e67081cad650063eee520b81fd651943
View file https://github.com/python/cpython/blob/76e9bc8391297e226351ac536b6f6bd2b1072805/Doc/library/socket.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/112337/{{ revealButtonHref }}
https://github.com/python/cpython/pull/112337/files#diff-e9e93d6b76a8a1cf0825d557b12e7ce3e67081cad650063eee520b81fd651943
https://github.com/python/cpython/pull/112337/files#diff-e9e93d6b76a8a1cf0825d557b12e7ce3e67081cad650063eee520b81fd651943
https://github.com/python/cpython/pull/112337/files#diff-e9e93d6b76a8a1cf0825d557b12e7ce3e67081cad650063eee520b81fd651943
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L116
Doc/whatsnew/3.16.rsthttps://github.com/python/cpython/pull/112337/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
View file https://github.com/python/cpython/blob/76e9bc8391297e226351ac536b6f6bd2b1072805/Doc/whatsnew/3.16.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/112337/{{ revealButtonHref }}
https://github.com/python/cpython/pull/112337/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
https://github.com/python/cpython/pull/112337/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
Lib/socket.pyhttps://github.com/python/cpython/pull/112337/files#diff-081d33d48e9390350bb1ef860c52de799d1647b58e33b07173ae2549532cbfbe
View file https://github.com/python/cpython/blob/76e9bc8391297e226351ac536b6f6bd2b1072805/Lib/socket.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/112337/{{ revealButtonHref }}
https://github.com/python/cpython/pull/112337/files#diff-081d33d48e9390350bb1ef860c52de799d1647b58e33b07173ae2549532cbfbe
https://github.com/python/cpython/pull/112337/files#diff-081d33d48e9390350bb1ef860c52de799d1647b58e33b07173ae2549532cbfbe
https://github.com/python/cpython/pull/112337/files#diff-081d33d48e9390350bb1ef860c52de799d1647b58e33b07173ae2549532cbfbe
https://github.com/python/cpython/pull/112337/files#diff-081d33d48e9390350bb1ef860c52de799d1647b58e33b07173ae2549532cbfbe
https://github.com/python/cpython/pull/112337/files#diff-081d33d48e9390350bb1ef860c52de799d1647b58e33b07173ae2549532cbfbe
https://github.com/python/cpython/pull/112337/files#diff-081d33d48e9390350bb1ef860c52de799d1647b58e33b07173ae2549532cbfbe
Lib/test/test_socket.pyhttps://github.com/python/cpython/pull/112337/files#diff-ce79808e12f7a252c1747c23ba11810d4dc22ce0af4b9419bac647ad3a2a8389
View file https://github.com/python/cpython/blob/76e9bc8391297e226351ac536b6f6bd2b1072805/Lib/test/test_socket.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/112337/{{ revealButtonHref }}
https://github.com/python/cpython/pull/112337/files#diff-ce79808e12f7a252c1747c23ba11810d4dc22ce0af4b9419bac647ad3a2a8389
https://github.com/python/cpython/pull/112337/files#diff-ce79808e12f7a252c1747c23ba11810d4dc22ce0af4b9419bac647ad3a2a8389
Misc/NEWS.d/next/Windows/2023-11-23-22-25-16.gh-issue-65920.6wWsHN.rsthttps://github.com/python/cpython/pull/112337/files#diff-dc907510d7e9976b886a38aedba78d7235600439b56a8bbba5425e8aaaae1081
View file https://github.com/python/cpython/blob/76e9bc8391297e226351ac536b6f6bd2b1072805/Misc/NEWS.d/next/Windows/2023-11-23-22-25-16.gh-issue-65920.6wWsHN.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/112337/{{ revealButtonHref }}
Modules/clinic/overlapped.c.hhttps://github.com/python/cpython/pull/112337/files#diff-bbfab8a5415fa3f7072bdd200ebf79f1bb8290fa6b0fb26771c7e950ebb19dfe
View file https://github.com/python/cpython/blob/76e9bc8391297e226351ac536b6f6bd2b1072805/Modules/clinic/overlapped.c.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/112337/files
Modules/overlapped.chttps://github.com/python/cpython/pull/112337/files#diff-c2b25616ea65bee7385cf794c70c41497c8953b56ceb9eed382fb1cb2ca799c2
View file https://github.com/python/cpython/blob/76e9bc8391297e226351ac536b6f6bd2b1072805/Modules/overlapped.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/112337/{{ revealButtonHref }}
https://github.com/python/cpython/pull/112337/files#diff-c2b25616ea65bee7385cf794c70c41497c8953b56ceb9eed382fb1cb2ca799c2
https://github.com/python/cpython/pull/112337/files#diff-c2b25616ea65bee7385cf794c70c41497c8953b56ceb9eed382fb1cb2ca799c2
https://github.com/python/cpython/pull/112337/files#diff-c2b25616ea65bee7385cf794c70c41497c8953b56ceb9eed382fb1cb2ca799c2
https://github.com/python/cpython/pull/112337/files#diff-c2b25616ea65bee7385cf794c70c41497c8953b56ceb9eed382fb1cb2ca799c2
https://github.com/python/cpython/pull/112337/files#diff-c2b25616ea65bee7385cf794c70c41497c8953b56ceb9eed382fb1cb2ca799c2
https://github.com/python/cpython/pull/112337/files#diff-c2b25616ea65bee7385cf794c70c41497c8953b56ceb9eed382fb1cb2ca799c2
Please reload this pagehttps://github.com/python/cpython/pull/112337/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.