return Gateway with a asynchronously remotely
initialized counterpart Gateway (which may or may not succeed).
Note that the other sides gateways starts enumerating
its channels with even numbers while the sender
gateway starts with odd numbers. This allows to
uniquely identify channels across both sides.
def remote_bootstrap_gateway(self, io, extra=''):
origin: InstallableGateway
where:
function source:
def remote_bootstrap_gateway(self, io, extra=''):
""" return Gateway with a asynchronously remotely
initialized counterpart Gateway (which may or may not succeed).
Note that the other sides gateways starts enumerating
its channels with even numbers while the sender
gateway starts with odd numbers. This allows to
uniquely identify channels across both sides.
"""
bootstrap = ["we_are_remote=True", extra]
bootstrap += [getsource(x) for x in startup_modules]
bootstrap += [io.server_stmt, "Gateway(io=io, startcount=2).join(joinexec=False)",]
source = "\n".join(bootstrap)
self.trace("sending gateway bootstrap code")
io.write('%r\n' % source)
called in /home/johnny/projects/merlinux/py/dist/py/execnet/register.py