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

Base class for SSH subsystem implementations
Наследование: ISubsystemSession
Показать файл Открыть проект

Private Properties

Свойство Тип Описание
Channel_Closed void
Channel_DataReceived void
Channel_Exception void
EnsureNotDisposed void
EnsureSessionIsOpen void
Session_Disconnected void
Session_ErrorOccured void
SignalDisconnected void
SignalErrorOccurred void
UnsubscribeFromSessionEvents void

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

Метод Описание
Connect ( ) : void

Connects the subsystem using a new SSH channel session.

Disconnect ( ) : void

Disconnects the subsystem channel.

Dispose ( ) : void

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

SendData ( byte data ) : void

Sends data to the subsystem.

WaitOnHandle ( WaitHandle waitHandle, TimeSpan operationTimeout ) : void

Waits a specified time for a given WaitHandle to get signaled.

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

Метод Описание
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

OnChannelOpen ( ) : void

Called when channel is open.

OnDataReceived ( byte data ) : void

Called when data is received.

RaiseError ( Exception error ) : void

Raises the error.

SubsystemSession ( ISession session, string subsystemName, TimeSpan operationTimeout, Encoding encoding ) : System

Initializes a new instance of the SubsystemSession class.

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

Метод Описание
Channel_Closed ( object sender, ChannelEventArgs e ) : void
Channel_DataReceived ( object sender, ChannelDataEventArgs e ) : void
Channel_Exception ( object sender, ExceptionEventArgs e ) : void
EnsureNotDisposed ( ) : void
EnsureSessionIsOpen ( ) : void
Session_Disconnected ( object sender, EventArgs e ) : void
Session_ErrorOccured ( object sender, ExceptionEventArgs e ) : void
SignalDisconnected ( ) : void
SignalErrorOccurred ( Exception error ) : void
UnsubscribeFromSessionEvents ( ISession session ) : void

Unsubscribes the current SubsystemSession from session events.

Does nothing when session is null.

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

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

Connects the subsystem using a new SSH channel session.
The session is already connected. The method was called after the session was disposed.
public Connect ( ) : void
Результат void

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

Disconnects the subsystem channel.
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

OnChannelOpen() защищенный абстрактный метод

Called when channel is open.
protected abstract OnChannelOpen ( ) : void
Результат void

OnDataReceived() защищенный абстрактный метод

Called when data is received.
protected abstract OnDataReceived ( byte data ) : void
data byte The data.
Результат void

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

Raises the error.
protected RaiseError ( Exception error ) : void
error System.Exception The error.
Результат void

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

Sends data to the subsystem.
public SendData ( byte data ) : void
data byte The data to be sent.
Результат void

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

Initializes a new instance of the SubsystemSession class.
or or is null.
protected SubsystemSession ( ISession session, string subsystemName, TimeSpan operationTimeout, Encoding encoding ) : System
session ISession The session.
subsystemName string Name of the subsystem.
operationTimeout TimeSpan The operation timeout.
encoding Encoding The character encoding to use.
Результат System

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

Waits a specified time for a given WaitHandle to get signaled.
The connection was closed by the server. The channel was closed. The handle did not get signaled within the specified .
public WaitOnHandle ( WaitHandle waitHandle, TimeSpan operationTimeout ) : void
waitHandle WaitHandle The handle to wait for.
operationTimeout TimeSpan The time to wait for to get signaled.
Результат void