b.t.s.SSHSubprocessConnection(SSHConnection) : class documentation

Part of bzrlib.transport.ssh View In Hierarchy

A connection to an ssh subprocess via pipes or a socket.

This class is also socket-like enough to be used with SocketAsChannelAdapter (it has 'send' and 'recv' methods).

Method __init__ Constructor.
Method send Undocumented
Method recv Undocumented
Method close Undocumented
Method get_sock_or_pipes Returns a (kind, io_object) pair.
def __init__(self, proc, sock=None):
Constructor.
Parametersproca subprocess.Popen
sockif proc.stdin/out is a socket from a socketpair, then sock should bzrlib's half of that socketpair. If not passed, proc's stdin/out is assumed to be ordinary pipes.
def send(self, data):
Undocumented
def recv(self, count):
Undocumented
def close(self):
Undocumented
def get_sock_or_pipes(self):
Returns a (kind, io_object) pair.

If kind == 'socket', then io_object is a socket.

If kind == 'pipes', then io_object is a pair of file-like objects (read_from, write_to).

API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.