C# 클래스 Renci.SshNet.ForwardedPortLocal

Provides functionality for local port forwarding
상속: ForwardedPort, IDisposable
파일 보기 프로젝트 열기: sshnet/SSH.NET 1 사용 예제들

공개 메소드들

메소드 설명
Dispose ( ) : void

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

ForwardedPortLocal ( string boundHost, string host, uint port ) : System

Initializes a new instance of the ForwardedPortLocal class.

ForwardedPortLocal ( string boundHost, uint boundPort, string host, uint port ) : System

Initializes a new instance of the ForwardedPortLocal class.

ForwardedPortLocal ( uint boundPort, string host, uint port ) : System

Initializes a new instance of the ForwardedPortLocal class.

보호된 메소드들

메소드 설명
CheckDisposed ( ) : void

Ensures the current instance is not disposed.

Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

StartPort ( ) : void

Starts local port forwarding.

StopPort ( System.TimeSpan timeout ) : void

Stops local port forwarding, and waits for the specified timeout until all pending requests are processed.

비공개 메소드들

메소드 설명
AcceptCompleted ( object sender, SocketAsyncEventArgs e ) : void
Channel_Exception ( object sender, System.ExceptionEventArgs e ) : void
CloseClientSocket ( Socket clientSocket ) : void
InitializePendingChannelCountdown ( ) : void

Initializes the CountdownEvent.

When the port is started for the first time, a CountdownEvent is created with an initial count of 1.

On subsequent (re)starts, we'll dispose the current CountdownEvent and create a new one with initial count of 1.

InternalDispose ( bool disposing ) : void
InternalStart ( ) : void
InternalStop ( System.TimeSpan timeout ) : void
ProcessAccept ( Socket clientSocket ) : void
Session_Disconnected ( object sender, EventArgs e ) : void
Session_ErrorOccured ( object sender, System.ExceptionEventArgs e ) : void
StartAccept ( SocketAsyncEventArgs e ) : void
StopListener ( ) : void

Interrupts the listener, and waits for the listener loop to finish.

When the forwarded port is stopped, then any further action is skipped.

메소드 상세

CheckDisposed() 보호된 메소드

Ensures the current instance is not disposed.
The current instance is disposed.
protected CheckDisposed ( ) : 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

ForwardedPortLocal() 공개 메소드

Initializes a new instance of the ForwardedPortLocal class.
is null. is null. is greater than .
public ForwardedPortLocal ( string boundHost, string host, uint port ) : System
boundHost string The bound host.
host string The host.
port uint The port.
리턴 System

ForwardedPortLocal() 공개 메소드

Initializes a new instance of the ForwardedPortLocal class.
is null. is null. is greater than . is greater than .
public ForwardedPortLocal ( string boundHost, uint boundPort, string host, uint port ) : System
boundHost string The bound host.
boundPort uint The bound port.
host string The host.
port uint The port.
리턴 System

ForwardedPortLocal() 공개 메소드

Initializes a new instance of the ForwardedPortLocal class.
is greater than . is null. is greater than .
public ForwardedPortLocal ( uint boundPort, string host, uint port ) : System
boundPort uint The bound port.
host string The host.
port uint The port.
리턴 System

StartPort() 보호된 메소드

Starts local port forwarding.
protected StartPort ( ) : void
리턴 void

StopPort() 보호된 메소드

Stops local port forwarding, and waits for the specified timeout until all pending requests are processed.
protected StopPort ( System.TimeSpan timeout ) : void
timeout System.TimeSpan The maximum amount of time to wait for pending requests to finish processing.
리턴 void