C# Class Renci.SshNet.Channels.ChannelForwardedTcpip

Implements "forwarded-tcpip" SSH channel.
Inheritance: ServerChannel, IChannelForwardedTcpip
Show file Open project: sshnet/SSH.NET Class Usage Examples

Public Methods

Method Description
Bind ( IPEndPoint remoteEndpoint, IForwardedPort forwardedPort ) : void

Binds the channel to the specified endpoint.

Protected Methods

Method Description
Close ( ) : void

Closes the channel waiting for the SSH_MSG_CHANNEL_CLOSE message to be received from the server.

OnData ( byte data ) : void

Called when channel data is received.

OnErrorOccured ( Exception exp ) : void

Private Methods

Method Description
ChannelForwardedTcpip ( ISession session, uint localChannelNumber, uint localWindowSize, uint localPacketSize, uint remoteChannelNumber, uint remoteWindowSize, uint remotePacketSize ) : System

Initializes a new ChannelForwardedTcpip instance.

CloseSocket ( ) : void

Closes the socket, hereby interrupting the blocking receive in Bind(IPEndPoint,IForwardedPort).

ForwardedPort_Closing ( object sender, EventArgs eventArgs ) : void

Occurs as the forwarded port is being stopped.

ShutdownSocket ( SocketShutdown how ) : void

Shuts down the socket.

Method Details

Bind() public method

Binds the channel to the specified endpoint.
public Bind ( IPEndPoint remoteEndpoint, IForwardedPort forwardedPort ) : void
remoteEndpoint System.Net.IPEndPoint The endpoint to connect to.
forwardedPort IForwardedPort The forwarded port for which the channel is opened.
return void

Close() protected method

Closes the channel waiting for the SSH_MSG_CHANNEL_CLOSE message to be received from the server.
protected Close ( ) : void
return void

OnData() protected method

Called when channel data is received.
protected OnData ( byte data ) : void
data byte The data.
return void

OnErrorOccured() protected method

protected OnErrorOccured ( Exception exp ) : void
exp System.Exception
return void