def detach(self):
    """Get the socket.  This should only be called once."""
with _resource_sharer.get_connection(self._id) as conn:
    share = conn.recv_bytes()
return socket.fromshare(share)
Python multiprocessing and networking on Windows