A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-March/117575.html below:

[Python-Dev] sharing sockets among processes on windows

[Python-Dev] sharing sockets among processes on windowsKristján Valur Jónsson kristjan at ccpgames.com
Wed Mar 14 01:27:14 CET 2012
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:

1)      Sockets have a method, duplicate(target_pid), that return a bytes object containing the socket info for the target process

2)      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>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4