Struct openssh_mux_client::Connection [−][src]
pub struct Connection { /* fields omitted */ }
Expand description
Cancel safety
All methods of this struct is not cancellation safe.
Implementations
Send a ping to the server and return pid of the ssh mux server if it is still alive.
pub async fn open_new_session(
self,
session: &Session<'_>,
fds: &[RawFd; 3]
) -> Result<EstablishedSession>
pub async fn open_new_session(
self,
session: &Session<'_>,
fds: &[RawFd; 3]
) -> Result<EstablishedSession>
Opens a new session.
Consumes self
so that users would not be able to create multiple sessions
or perform other operations during the session that might complicates the
handling of packets received from the ssh mux server.
Two additional cases that the client must cope with are it receiving a signal itself (from the ssh mux server) and the server disconnecting without sending an exit message.
Convenient function for opening a new sftp session, uses
open_new_session
underlying.
pub async fn request_port_forward(
&mut self,
forward_type: ForwardType,
listen_socket: &Socket<'_>,
connect_socket: &Socket<'_>
) -> Result<()>
pub async fn request_port_forward(
&mut self,
forward_type: ForwardType,
listen_socket: &Socket<'_>,
connect_socket: &Socket<'_>
) -> Result<()>
pub async fn request_dynamic_forward(
&mut self,
listen_socket: &Socket<'_>
) -> Result<NonZeroU32>
pub async fn request_dynamic_forward(
&mut self,
listen_socket: &Socket<'_>
) -> Result<NonZeroU32>
UNTESTED Return remote port opened for dynamic forwarding.
Request the master to stop accepting new multiplexing requests and remove its listener socket.