Struct thrussh::server::Session [−][src]
pub struct Session { /* fields omitted */ }
Expand description
A connected server session. This type is unique to a client.
Implementations
Flush the session, i.e. encrypt the pending buffer.
Sends a disconnect message.
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).
Send a “failure” reply to a global request.
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).
Send a “failure” reply to a global request.
pub fn channel_open_failure(
&mut self,
channel: ChannelId,
reason: ChannelOpenFailure,
description: &str,
language: &str
)
pub fn channel_open_failure(
&mut self,
channel: ChannelId,
reason: ChannelOpenFailure,
description: &str,
language: &str
)
Send a “failure” reply to a request to open a channel open.
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
.
The number of bytes added to the “sending pipeline” (to be processed by the event loop) is returned.
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
.
The number of bytes added to the “sending pipeline” (to be processed by the event loop) is returned.
Inform the client of whether they may perform control-S/control-Q flow control. See RFC4254.
Send the exit status of a program.
If the program was killed by a signal, send the details about the signal to the client.
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()
.
Auto Trait Implementations
impl !RefUnwindSafe for Session
impl !UnwindSafe for Session