python / cpython

The Python programming language
https://www.python.org
Other
62.32k stars 29.94k forks source link

Implementing sendmsg()/recvmsg() methods on Windows #122153

Open artiomn opened 1 month ago

artiomn commented 1 month ago

Feature or enhancement

Proposal:

Methods socket.sendmsg() and socket.recvmsg() are implemented only for Unix-like systems. But Windows OS has similar API too: https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-wsasendmsg

Implementing these methods for WinSock2 will improve Python code portability.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

James-E-A commented 3 weeks ago

Duplicate of #80398 ?


Also,

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

This actually has been discussed previously -- https://github.com/python/cpython/issues/50809#issuecomment-1093475505

I don't know if it's feasible to support these new APIs at the socket module level on Windows, but any patches along those lines should also be placed in a new issue rather than being added to this one.