Struct thrussh::client::Connection
[−]
[src]
pub struct Connection<'a> { pub session: Session<'a>, // some fields omitted }
Client connection.
Fields
session: Session<'a>
Methods
impl<'a> Connection<'a>
[src]
fn new(config: Arc<Config>) -> Self
fn read<R: BufRead, C: Client>(&mut self, client: &mut C, stream: &mut R, buffer: &mut CryptoBuf, buffer2: &mut CryptoBuf) -> Result<bool, Error>
Process all packets available in the buffer, and returns
whether at least one complete packet was read.
buffer
and buffer2
are work spaces mostly used to compute keys. They are cleared before using, hence nothing is expected from them.
fn write<W: Write>(&mut self, stream: &mut W) -> Result<bool, Error>
Write all computed packets to the stream. Returns whether all packets have been sent.