C# Класс Renci.SshNet.BaseClient

Serves as base class for client implementations, provides common client functionality.
Наследование: IDisposable
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
BaseClient System
SendKeepAlive void
SendKeepAliveMessage void
Session_ErrorOccured void
Session_HostKeyReceived void
StartKeepAliveTimer void
StopKeepAliveTimer void

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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.

Описание методов

BaseClient() защищенный метод

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.
Результат System

CheckDisposed() защищенный метод

Check if the current instance is disposed.
THe current instance is disposed.
protected CheckDisposed ( ) : void
Результат void

Connect() публичный метод

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
Результат void

Disconnect() публичный метод

Disconnects client from the server.
The method was called after the client was disposed.
public Disconnect ( ) : void
Результат void

Dispose() публичный метод

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
Результат void

Dispose() защищенный метод

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.
Результат void

OnConnected() защищенный метод

Called when client is connected to the server.
protected OnConnected ( ) : void
Результат void

OnConnecting() защищенный метод

Called when client is connecting to the server.
protected OnConnecting ( ) : void
Результат void

OnDisconnected() защищенный метод

Called when client is disconnected from the server.
protected OnDisconnected ( ) : void
Результат void

OnDisconnecting() защищенный метод

Called when client is disconnecting from the server.
protected OnDisconnecting ( ) : void
Результат void