[−][src]Struct thrussh::server::Session
A connected server session. This type is unique to a client.
Implementations
impl Session
[src]
pub fn handle(&self) -> Handle
[src]
Get a handle to this session.
pub fn writable_packet_size(&self, channel: &ChannelId) -> u32
[src]
pub fn window_size(&self, channel: &ChannelId) -> u32
[src]
pub fn max_packet_size(&self, channel: &ChannelId) -> u32
[src]
pub fn flush(&mut self) -> Result<(), Error>
[src]
Flush the session, i.e. encrypt the pending buffer.
pub fn flush_pending(&mut self, channel: ChannelId) -> usize
[src]
pub fn sender_window_size(&self, channel: ChannelId) -> usize
[src]
pub fn has_pending_data(&self, channel: ChannelId) -> bool
[src]
pub fn config(&self) -> &Config
[src]
Retrieves the configuration of this session.
pub fn disconnect(
&mut self,
reason: Disconnect,
description: &str,
language_tag: &str
)
[src]
&mut self,
reason: Disconnect,
description: &str,
language_tag: &str
)
Sends a disconnect message.
pub fn request_success(&mut self)
[src]
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).
pub fn request_failure(&mut self)
[src]
Send a "failure" reply to a global request.
pub fn channel_success(&mut self, channel: ChannelId)
[src]
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).
pub fn channel_failure(&mut self, channel: ChannelId)
[src]
Send a "failure" reply to a global request.
pub fn channel_open_failure(
&mut self,
channel: ChannelId,
reason: ChannelOpenFailure,
description: &str,
language: &str
)
[src]
&mut self,
channel: ChannelId,
reason: ChannelOpenFailure,
description: &str,
language: &str
)
Send a "failure" reply to a request to open a channel open.
pub fn close(&mut self, channel: ChannelId)
[src]
Close a channel.
pub fn eof(&mut self, channel: ChannelId)
[src]
Send EOF to a channel
pub fn data(&mut self, channel: ChannelId, data: CryptoVec)
[src]
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.
pub fn extended_data(
&mut self,
channel: ChannelId,
extended: u32,
data: CryptoVec
)
[src]
&mut self,
channel: ChannelId,
extended: u32,
data: CryptoVec
)
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.
pub fn xon_xoff_request(&mut self, channel: ChannelId, client_can_do: bool)
[src]
Inform the client of whether they may perform control-S/control-Q flow control. See RFC4254.
pub fn exit_status_request(&mut self, channel: ChannelId, exit_status: u32)
[src]
Send the exit status of a program.
pub fn exit_signal_request(
&mut self,
channel: ChannelId,
signal: Sig,
core_dumped: bool,
error_message: &str,
language_tag: &str
)
[src]
&mut self,
channel: ChannelId,
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.
pub fn channel_open_forwarded_tcpip(
&mut self,
connected_address: &str,
connected_port: u32,
originator_address: &str,
originator_port: u32
) -> Result<ChannelId, Error>
[src]
&mut self,
connected_address: &str,
connected_port: u32,
originator_address: &str,
originator_port: u32
) -> Result<ChannelId, Error>
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 Send for Session
impl Sync for Session
impl Unpin for Session
impl !UnwindSafe for Session
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,