C# Class Renci.SshNet.Channels.ChannelDirectTcpip

Implements "direct-tcpip" SSH channel.
Inheritance: ClientChannel, IChannelDirectTcpip
Afficher le fichier Open project: sshnet/SSH.NET Class Usage Examples

Méthodes publiques

Méthode Description
Bind ( ) : void

Binds channel to remote host.

ChannelDirectTcpip ( ISession session, uint localChannelNumber, uint localWindowSize, uint localPacketSize ) : System

Initializes a new ChannelDirectTcpip instance.

Open ( string remoteHost, uint port, IForwardedPort forwardedPort, Socket socket ) : void

Méthodes protégées

Méthode Description
Close ( ) : void

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

Dispose ( bool disposing ) : void
OnData ( byte data ) : void

Called when channel data is received.

OnDisconnected ( ) : void

Called when the server wants to terminate the connection immmediately.

The sender MUST NOT send or receive any data after this message, and the recipient MUST NOT accept any data after receiving this message.

OnEof ( ) : void

Called when channel has no more data to receive.

OnErrorOccured ( Exception exp ) : void

Called whenever an unhandled Exception occurs in Session causing the message loop to be interrupted, or when an exception occurred processing a channel message.

OnOpenConfirmation ( uint remoteChannelNumber, uint initialWindowSize, uint maximumPacketSize ) : void

Called when channel is opened by the server.

OnOpenFailure ( uint reasonCode, string description, string language ) : void

Private Methods

Méthode Description
CloseSocket ( ) : void

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

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 méthode

Binds channel to remote host.
public Bind ( ) : void
Résultat void

ChannelDirectTcpip() public méthode

Initializes a new ChannelDirectTcpip instance.
public ChannelDirectTcpip ( ISession session, uint localChannelNumber, uint localWindowSize, uint localPacketSize ) : System
session ISession The session.
localChannelNumber uint The local channel number.
localWindowSize uint Size of the window.
localPacketSize uint Size of the packet.
Résultat System

Close() protected méthode

Closes the channel, waiting for the SSH_MSG_CHANNEL_CLOSE message to be received from the server.
protected Close ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

OnData() protected méthode

Called when channel data is received.
protected OnData ( byte data ) : void
data byte The data.
Résultat void

OnDisconnected() protected méthode

Called when the server wants to terminate the connection immmediately.
The sender MUST NOT send or receive any data after this message, and the recipient MUST NOT accept any data after receiving this message.
protected OnDisconnected ( ) : void
Résultat void

OnEof() protected méthode

Called when channel has no more data to receive.
protected OnEof ( ) : void
Résultat void

OnErrorOccured() protected méthode

Called whenever an unhandled Exception occurs in Session causing the message loop to be interrupted, or when an exception occurred processing a channel message.
protected OnErrorOccured ( Exception exp ) : void
exp System.Exception
Résultat void

OnOpenConfirmation() protected méthode

Called when channel is opened by the server.
protected OnOpenConfirmation ( uint remoteChannelNumber, uint initialWindowSize, uint maximumPacketSize ) : void
remoteChannelNumber uint The remote channel number.
initialWindowSize uint Initial size of the window.
maximumPacketSize uint Maximum size of the packet.
Résultat void

OnOpenFailure() protected méthode

protected OnOpenFailure ( uint reasonCode, string description, string language ) : void
reasonCode uint
description string
language string
Résultat void

Open() public méthode

public Open ( string remoteHost, uint port, IForwardedPort forwardedPort, Socket socket ) : void
remoteHost string
port uint
forwardedPort IForwardedPort
socket Socket
Résultat void