Struct ssh_rs::ExecBroker
source · pub struct ExecBroker(_);
Implementations§
source§impl ExecBroker
impl ExecBroker
sourcepub fn send_command(&self, command: &str) -> SshResult<()>
pub fn send_command(&self, command: &str) -> SshResult<()>
Send an executable command to the server
This method is non-block as it will not wait the result
sourcepub fn get_result(self) -> SshResult<Vec<u8>>
pub fn get_result(self) -> SshResult<Vec<u8>>
Get the result of the prior command
This method will block until the server close the channel
This method also implicitly consume the channel object, since the exec channel can only execute one command