C# 클래스 Renci.SshNet.SubsystemSession

Base class for SSH subsystem implementations
상속: ISubsystemSession
파일 보기 프로젝트 열기: sshnet/SSH.NET

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