Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev
sharing sockets among processes on windows
 

Index | Next | Previous | View Flat


kristjan at ccpgames

Mar 13, 2012, 5:27 PM


Views: 165
Permalink
sharing sockets among processes on windows

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

Subject User Time
sharing sockets among processes on windows kristjan at ccpgames Mar 13, 2012, 5:27 PM
    Re: sharing sockets among processes on windows glyph at twistedmatrix Mar 14, 2012, 5:21 PM
    Re: sharing sockets among processes on windows kristjan at ccpgames Mar 14, 2012, 5:32 PM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.