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

pub struct Connection<R: Read + Write, H: Handler> {
    pub session: Option<Session>,
    // some fields omitted
}

Client connection.

Fields

Session of this connection.

Methods

impl<R: Read + Write, H: Handler> Connection<R, H>
[src]

[src]

Create a new client connection.

impl<R: Read + Write, 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]

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.

[src]

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

[src]

Wait until a condition is met on the connection.

[src]

Flush the session, sending any pending message.

[src]

Wait until the next message is read from the remote.

[src]

Gets a borrow to the connection's handler.

[src]

Gets a mutable borrow to the connection's handler.

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

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]

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: Read + Write, H: Handler> Deref for Connection<R, H>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<R: Read + Write, H: Handler> DerefMut for Connection<R, H>
[src]

[src]

Mutably dereferences the value.

impl<R: Read + Write, 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