Passing a socket to another process under Windows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jinsue
    New Member
    • Oct 2007
    • 9

    Passing a socket to another process under Windows

    Searching around the net there are cases where this has been a problem for people as socket.fromfd() and socket.dup() don't exist under Windows.

    Apparently there was a workaround but that kinda didn't work and people suggest patches to recreate the functionality those two functions give but I do not know how to:
    a)Implement a viable workaround or b)Patch my version of Python (2.6.5)

    Apparently workable patch (I've never patched python and don't know what I'm doing here): http://bugs.python.org/issue1378

    A similar case who has problems and no end solution: http://www.gossamer-threads.com/list.../python/814079

    In short, I don't really care how I do it. I just want a way to pass an established socket from one python process to another while maintaining its integrity, in a Windows environment.

    Please advise.
  • dwblas
    Recognized Expert Contributor
    • May 2008
    • 626

    #2
    I don't really care how I do it. I just want a way to pass an established socket from one python process to another while maintaining its integrity, in a Windows environment.
    See if multiprocessing will work instead of sockets. You can communicate between processes, pass variables, etc. Doug Hellmann's page gives a good overview. "pass an established socket from one python process to another" has may alternatives, i.e. pass data from another process to the the "socket" process, access variables in the socket process, pass input or read output, etc. A __simple__ coded example with explanation and problems would probably generate more answers.

    Comment

    Working...