[Python-Dev] sharing sockets among processes on windows (original) (raw)
Kristján Valur Jónsson kristjan at ccpgames.com
Wed Mar 14 01:27:14 CET 2012
- Previous message: [Python-Dev] Drop the new time.wallclock() function?
- Next message: [Python-Dev] sharing sockets among processes on windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi, I´m interested in contributing a patch to duplicate sockets between processes on windows. Tha api to do this is WSADuplicateSocket/WSASocket(), as already used by dup() in the _socketmodule.c Here´s what I have:
Sockets have a method, duplicate(target_pid), that return a bytes object containing the socket info for the target process
When socket(x, y, z, data) is called with this bytes object as the fourth argument, it is recreated from that.
What are your thoughts on this? Also, should I try to reuse the socket.dup() function somehow, perhaps by giving the target pid? Secondly, there is multiprocessing.reduction which is doing similar things for unix. Does anyone familiar with it know how it goes about doing this? Would it be simple to change it to use this mechanism on windows?
Kristján -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120314/1cd4bd7b/attachment-0001.html>
- Previous message: [Python-Dev] Drop the new time.wallclock() function?
- Next message: [Python-Dev] sharing sockets among processes on windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]