Struct thrussh::server::Session
[−]
[src]
pub struct Session(_);
Methods
impl Session
[src]
fn config(&self) -> &Config
Retrieves the configuration of this session.
fn disconnect(&mut self, reason: Disconnect, description: &str, language_tag: &str)
Sends a disconnect message.
fn request_success(&mut self)
Send a "success" reply to a /global/ request (requests without a channel number, such as TCP/IP forwarding or cancelling). Always call this function if the request was successful (it checks whether the client expects an answer).
fn request_failure(&mut self)
Send a "failure" reply to a global request.
fn channel_success(&mut self, channel: u32)
Send a "success" reply to a channel request. Always call this function if the request was successful (it checks whether the client expects an answer).
fn channel_failure(&mut self, channel: u32)
Send a "failure" reply to a global request.
fn channel_open_failure(&mut self, channel: u32, reason: ChannelOpenFailure, description: &str, language: &str)
Send a "failure" reply to a request to open a channel open.
fn close(&mut self, channel: u32)
Close a channel.
fn eof(&mut self, channel: u32)
Send EOF to a channel
fn data(&mut self, channel: u32, extended: Option<u32>, data: &[u8]) -> Result<usize, Error>
Send data to a channel. On session channels, extended
can be used to encode standard error by passing Some(1)
, and stdout by passing None
.
fn xon_xoff_request(&mut self, channel: u32, client_can_do: bool)
Inform the client of whether they may perform control-S/control-Q flow control. See RFC4254.
fn exit_status_request(&mut self, channel: u32, exit_status: u32)
Send the exit status of a program.
fn exit_signal_request(&mut self, channel: u32, signal: Sig, core_dumped: bool, error_message: &str, language_tag: &str)
If the program was killed by a signal, send the details about the signal to the client.
fn channel_open_forwarded_tcpip(&mut self, connected_address: &str, connected_port: u32, originator_address: &str, originator_port: u32) -> Option<u32>
Open a TCP/IP forwarding channel, when a connection comes to a local port for which forwarding has been requested. See RFC4254. The TCP/IP packets can then be tunneled through the channel using .data()
.