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<boolError>

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<boolError>

Write all computed packets to the stream. Returns whether all packets have been sent.

Trait Implementations

impl<'a> Debug for Connection<'a>
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.