Struct thrussh_client::Basic [] [src]

pub struct Basic;

Trait Implementations

impl Handler for Basic
[src]

fn auth_banner(&mut self, banner: &str)

Called when the server sends us an authentication banner. This is usually meant to be shown to the user, see RFC4252 for more details.

fn check_server_key(&mut self, server_public_key: &PublicKey) -> Result<boolError>

Called to check the server's public key. This is a very important step to help prevent man-in-the-middle attacks. The default implementation rejects all keys. Read more

fn channel_open_confirmation(&mut self, channel: u32, session: &mut Session) -> Result<()Error>

Called when the server confirmed our request to open a channel. A channel can only be written to after receiving this message (this library panics otherwise).

fn channel_close(&mut self, channel: u32, session: &mut Session) -> Result<()Error>

Called when the server closes a channel.

fn channel_eof(&mut self, channel: u32, session: &mut Session) -> Result<()Error>

Called when the server sends EOF to a channel.

fn channel_open_failure(&mut self, channel: u32, reason: ChannelOpenFailure, description: &str, language: &str, session: &mut Session) -> Result<()Error>

Called when the server rejected our request to open a channel.

fn channel_open_forwarded_tcpip(&mut self, channel: u32, connected_address: &str, connected_port: u32, originator_address: &str, originator_port: u32, session: &mut Session)

Called when a new channel is created.

fn data(&mut self, channel: u32, extended_code: Option<u32>, data: &[u8], session: &mut Session) -> Result<()Error>

Called when the server sends us data. The extended_code parameter is a stream identifier, None is usually the standard output, and Some(1) is the standard error. See RFC4254.

fn xon_xoff(&mut self, channel: u32, client_can_do: bool, session: &mut Session) -> Result<()Error>

The server informs this client of whether the client may perform control-S/control-Q flow control. See RFC4254.

fn exit_status(&mut self, channel: u32, exit_status: u32, session: &mut Session) -> Result<()Error>

The remote process has exited, with the given exit status.

fn exit_signal(&mut self, channel: u32, signal_name: Sig, core_dumped: bool, error_message: &str, lang_tag: &str, session: &mut Session) -> Result<()Error>

The remote process exited upon receiving a signal.

fn window_adjusted(&mut self, channel: u32, session: &mut Session) -> Result<()Error>

Called when the network window is adjusted, meaning that we can send more bytes. This is useful if this client wants to send huge amounts of data, for instance if we have called Session::data before, and it returned less than the full amount of data. Read more