execnet.SocketGateway API [rev. unknown]

class SocketGateway(InstallableGateway):

This Gateway provides interaction with a remote process by connecting to a specified socket. On the remote side you need to manually start a small script (py/execnet/script/socketserver.py) that accepts SocketGateway connections.

class attributes and properties:

remoteaddress:

methods:

def __init__(self, host, port):

instantiate a gateway to a process accessed via a host/port specified socket.

def exit(self):

Try to stop all exec and IO activity.

def join(self, joinexec=True):

Wait for all IO (and by default all execution activity) to stop. the joinexec parameter is obsolete.

def new_remote(cls, gateway, hostport=None):

return a new (connected) socket gateway, instatiated indirectly through the given 'gateway'.

def newchannel(self):

return new channel object.

def remote_exec(self, source, stdout=None, stderr=None):

return channel object and connect it to a remote execution thread where the given 'source' executes and has the sister 'channel' object in its global namespace. The callback functions 'stdout' and 'stderr' get called on receival of remote stdout/stderr output strings.

def remote_init_threads(self, num=None):

start up to 'num' threads for subsequent remote_exec() invocations to allow concurrent execution.

def __repr__(self):

return string representing gateway type and status.