Struct thrussh::client::Connection [] [src]

pub struct Connection<R: AsyncRead + AsyncWrite, H: Handler> { /* fields omitted */ }

Client connection. A connection implements Future, returning () when it finishes (for instance if the client and server agree to close the connection).

Methods

impl<R: AsyncRead + AsyncWrite, H: Handler> Connection<R, H>
[src]

[src]

Ask the server to close a channel, finishing any pending write and read.

Important traits for &'a mut W
[src]

Gets a borrow to the connection's handler.

Important traits for &'a mut W
[src]

Gets a mutable borrow to the connection's handler.

[src]

Tests whether a channel is open.

[src]

Create a new client connection.

impl<R: AsyncRead + AsyncWrite, H: Handler> Connection<R, H>
[src]

[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.

impl<R: AsyncRead + AsyncWrite + Tcp, H: Handler> Connection<R, H>
[src]

[src]

Try to authenticate this client using a password.

[src]

Try to authenticate this client using a key pair.

[src]

Try to authenticate this client using a key pair.

impl<R: AsyncRead + AsyncWrite, H: Handler> Connection<R, H>
[src]

[src]

Ask the server to open a session channel.

[src]

Ask the server to open an X11 forwarding channel.

[src]

Ask the server to open a direct TCP/IP forwarding channel.

impl<R: AsyncRead + AsyncWrite, H: Handler> Connection<R, H>
[src]

[src]

Wait until a condition is met on the connection.

[src]

Flush the session, sending any pending message.

Methods from Deref<Target = Session>

[src]

Flush the temporary cleartext buffer into the encryption buffer. This does not flush to the socket.

[src]

Retrieves the configuration of this session.

[src]

Retrieves the current user.

[src]

Sends a disconnect message.

[src]

Whether the client is authenticated.

[src]

Whether the client is disconnected.

[src]

Check whether a channel has been confirmed.

[src]

Tests whether we need an authentication method (for instance if the last attempt failed).

[src]

Returns the set of authentication methods that can continue, or None if this is not valid.

[src]

Request a session channel (the most basic type of channel). This function returns Some(..) immediately if the connection is authenticated, but the channel only becomes usable when it's confirmed by the server, as indicated by the confirmed field of the corresponding Channel.

[src]

Request an X11 channel, on which the X11 protocol may be tunneled.

[src]

Open a TCP/IP forwarding channel. This is usually done when a connection comes to a locally forwarded TCP/IP port. See RFC4254. The TCP/IP packets can then be tunneled through the channel using .data().

[src]

Send EOF to a channel

[src]

Request a pseudo-terminal with the given characteristics.

[src]

Request X11 forwarding through an already opened X11 channel. See RFC4254 for security issues related to cookies.

[src]

Set a remote environment variable.

[src]

Request a remote shell.

[src]

Execute a remote program (will be passed to a shell). This can be used to implement scp (by calling a remote scp and tunneling to its standard input).

[src]

Signal a remote process.

[src]

Request the start of a subsystem with the given name.

[src]

Inform the server that our window size has changed.

[src]

Request the forwarding of a remote port to the client. The server will then open forwarding channels (which cause the client to call .channel_open_forwarded_tcpip()).

[src]

Cancel a previous forwarding request.

[src]

Send data to a channel. The number of bytes added to the "sending pipeline" (to be processed by the event loop) is returned.

Trait Implementations

impl<R: AsyncRead + AsyncWrite, H: Handler> Deref for Connection<R, H>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<R: AsyncRead + AsyncWrite, H: Handler> DerefMut for Connection<R, H>
[src]

[src]

Mutably dereferences the value.

impl<R: AsyncRead + AsyncWrite + Tcp, H: Handler> Future for Connection<R, H>
[src]

The type of value that this future will resolved with if it is successful. Read more

The type of error that this future will resolve with if it fails in a normal fashion. Read more

[src]

Query this future to see if its value has become available, registering interest if it is not. Read more

[src]

Block the current thread until this future is resolved. Read more

[src]

Map this future's result to a different type, returning a new future of the resulting type. Read more

[src]

Map this future's error to a different error, returning a new future. Read more

[src]

Map this future's error to any error implementing From for this future's Error, returning a new future. Read more

[src]

Chain on a computation for when a future finished, passing the result of the future to the provided closure f. Read more

[src]

Execute another future after this one has resolved successfully. Read more

[src]

Execute another future if this one resolves with an error. Read more

[src]

Waits for either one of two futures to complete. Read more

[src]

Waits for either one of two differently-typed futures to complete. Read more

[src]

Joins the result of two futures, waiting for them both to complete. Read more

[src]

Same as join, but with more futures.

[src]

Same as join, but with more futures.

[src]

Same as join, but with more futures.

[src]

Convert this future into a single element stream. Read more

[src]

Flatten the execution of this future when the successful result of this future is itself another future. Read more

[src]

Flatten the execution of this future when the successful result of this future is a stream. Read more

[src]

Fuse a future such that poll will never again be called once it has completed. Read more

[src]

Do something with the item of a future, passing it on. Read more

[src]

Catches unwinding panics while polling the future. Read more

[src]

Create a cloneable handle to this future where all handles will resolve to the same result. Read more

Auto Trait Implementations

impl<R, H> Send for Connection<R, H> where
    H: Send,
    R: Send,
    <H as Handler>::FutureBool: Send,
    <H as Handler>::FutureSign: Send,
    <H as Handler>::SessionUnit: Send

impl<R, H> Sync for Connection<R, H> where
    H: Sync,
    R: Sync,
    <H as Handler>::FutureBool: Sync,
    <H as Handler>::FutureSign: Sync,
    <H as Handler>::SessionUnit: Sync