C# Class Renci.SshNet.BaseClient

Serves as base class for client implementations, provides common client functionality.
Inheritance: IDisposable
Datei anzeigen Open project: sshnet/SSH.NET

Private Properties

Property Type Description
BaseClient System
SendKeepAlive void
SendKeepAliveMessage void
Session_ErrorOccured void
Session_HostKeyReceived void
StartKeepAliveTimer void
StopKeepAliveTimer void

Public Methods

Method Description
Connect ( ) : void

Connects client to the server.

Disconnect ( ) : void

Disconnects client from the server.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Protected Methods

Method Description
BaseClient ( ConnectionInfo connectionInfo, bool ownsConnectionInfo ) : System

Initializes a new instance of the BaseClient class.

If ownsConnectionInfo is true, then the connection info will be disposed when this instance is disposed.

CheckDisposed ( ) : void

Check if the current instance is disposed.

Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

OnConnected ( ) : void

Called when client is connected to the server.

OnConnecting ( ) : void

Called when client is connecting to the server.

OnDisconnected ( ) : void

Called when client is disconnected from the server.

OnDisconnecting ( ) : void

Called when client is disconnecting from the server.

Private Methods

Method Description
BaseClient ( ConnectionInfo connectionInfo, bool ownsConnectionInfo, IServiceFactory serviceFactory ) : System

Initializes a new instance of the BaseClient class.

If ownsConnectionInfo is true, then the connection info will be disposed when this instance is disposed.

SendKeepAlive ( ) : void
SendKeepAliveMessage ( ) : void
Session_ErrorOccured ( object sender, ExceptionEventArgs e ) : void
Session_HostKeyReceived ( object sender, HostKeyEventArgs e ) : void
StartKeepAliveTimer ( ) : void

Starts the keep-alive timer.

When KeepAliveInterval is negative one (-1) milliseconds, then the timer will not be started.

StopKeepAliveTimer ( ) : void

Stops the keep-alive timer, and waits until all timer callbacks have been executed.

Method Details

BaseClient() protected method

Initializes a new instance of the BaseClient class.
If ownsConnectionInfo is true, then the connection info will be disposed when this instance is disposed.
is null.
protected BaseClient ( ConnectionInfo connectionInfo, bool ownsConnectionInfo ) : System
connectionInfo ConnectionInfo The connection info.
ownsConnectionInfo bool Specified whether this instance owns the connection info.
return System

CheckDisposed() protected method

Check if the current instance is disposed.
THe current instance is disposed.
protected CheckDisposed ( ) : void
return void

Connect() public method

Connects client to the server.
The client is already connected. The method was called after the client was disposed. Socket connection to the SSH server or proxy server could not be established, or an error occurred while resolving the hostname. SSH session could not be established. Authentication of SSH session failed. Failed to establish proxy connection.
public Connect ( ) : void
return void

Disconnect() public method

Disconnects client from the server.
The method was called after the client was disposed.
public Disconnect ( ) : void
return void

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

Dispose() protected method

Releases unmanaged and - optionally - managed resources
protected Dispose ( bool disposing ) : void
disposing bool true to release both managed and unmanaged resources; false to release only unmanaged resources.
return void

OnConnected() protected method

Called when client is connected to the server.
protected OnConnected ( ) : void
return void

OnConnecting() protected method

Called when client is connecting to the server.
protected OnConnecting ( ) : void
return void

OnDisconnected() protected method

Called when client is disconnected from the server.
protected OnDisconnected ( ) : void
return void

OnDisconnecting() protected method

Called when client is disconnecting from the server.
protected OnDisconnecting ( ) : void
return void