C# Класс Renci.SshNet.Channels.ChannelDirectTcpip

Implements "direct-tcpip" SSH channel.
Наследование: ClientChannel, IChannelDirectTcpip
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
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

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

Метод Описание
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

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

Метод Описание
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.

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

Bind() публичный Метод

Binds channel to remote host.
public Bind ( ) : void
Результат void

ChannelDirectTcpip() публичный Метод

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.
Результат System

Close() защищенный Метод

Closes the channel, waiting for the SSH_MSG_CHANNEL_CLOSE message to be received from the server.
protected Close ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

OnData() защищенный Метод

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

OnDisconnected() защищенный Метод

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
Результат void

OnEof() защищенный Метод

Called when channel has no more data to receive.
protected OnEof ( ) : void
Результат void

OnErrorOccured() защищенный Метод

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
Результат void

OnOpenConfirmation() защищенный Метод

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.
Результат void

OnOpenFailure() защищенный Метод

protected OnOpenFailure ( uint reasonCode, string description, string language ) : void
reasonCode uint
description string
language string
Результат void

Open() публичный Метод

public Open ( string remoteHost, uint port, IForwardedPort forwardedPort, Socket socket ) : void
remoteHost string
port uint
forwardedPort IForwardedPort
socket Socket
Результат void