C# 클래스 Granados.SSH2.SSH2ChannelBase

SSH2 channel base class.
상속: ISSHChannel
파일 보기 프로젝트 열기: poderosaproject/poderosa

공개 메소드들

메소드 설명
Close ( ) : void

Close this channel.

After calling this method, all mothods of the ISSHChannel will throw SSHChannelInvalidOperationException.If this method was called under the inappropriate channel state, the method call will be ignored silently.

ProcessPacket ( SSH2PacketType packetType, Granados.IO.DataFragment packetFragment ) : void

Process packet about this channel.

ResizeTerminal ( uint width, uint height, uint pixelWidth, uint pixelHeight ) : void

Send window dimension change message.

SSH2ChannelBase ( IPacketSender packetSender, SSHConnectionParameter param, SSHProtocolEventManager protocolEventManager, uint localChannel, ChannelType channelType, string channelTypeString ) : System

Constructor (initiated by client)

SSH2ChannelBase ( IPacketSender packetSender, SSHConnectionParameter param, SSHProtocolEventManager protocolEventManager, uint localChannel, uint remoteChannel, ChannelType channelType, string channelTypeString, uint serverWindowSize, uint serverMaxPacketSize ) : System

Constructor (initiated by server)

Send ( Granados.IO.DataFragment data ) : void

Send data.

SendBreak ( int breakLength ) : bool

Send Break. (SSH2, session channel only)

SendEOF ( ) : void

Send EOF.

SendOpen ( ) : void

Sends SSH_MSG_CHANNEL_OPEN

SendOpenConfirmation ( ) : void

Sends SSH_MSG_CHANNEL_OPEN_CONFIRMATION

SetHandler ( ISSHChannelEventHandler handler ) : void

Sets handler

WaitReady ( ) : bool

Block execution of the current thread until the channel is ready for the communication.

보호된 메소드들

메소드 설명
BuildOpenPacket ( ) : SSH2Packet

Builds SSH_MSG_CHANNEL_OPEN packet

Die ( ) : void

Notifies terminating this channel.

OnChannelEstablished ( ) : void

Do additional work when State was changed to State.Established.

ProcessPacketSub ( SSH2PacketType packetType, Granados.IO.DataFragment packetFragment ) : SubPacketProcessResult

Process packet additionally.

This method will be called repeatedly while State is State.Established or State.Ready.

RequestFailed ( ) : void

The derived class can change state from "Established" to "Closing" by calling this method.

SendRequest ( SSH2Packet requestPacket ) : void

Sends SSH_MSG_CHANNEL_REQUEST packet (no response)

SendRequestAndWaitResponseAsync ( SSH2Packet requestPacket ) : Task

Sends SSH_MSG_CHANNEL_REQUEST packet and wait response asynchronously.

SetStateReady ( ) : void

The derived class can change state from "Established" to "Ready" by calling this method.

Trace ( string format ) : void

Outputs Trace message.

Transmit ( int consumedSize, SSH2Packet packet ) : void

Sends a packet.

비공개 메소드들

메소드 설명
AdjustWindowSize ( int dataLength ) : void

Adjust window size.

SetStateClosed ( bool byServer ) : void

Set state to "Closed".

WaitResponseAsync ( ) : Task

메소드 상세

BuildOpenPacket() 보호된 메소드

Builds SSH_MSG_CHANNEL_OPEN packet
protected BuildOpenPacket ( ) : SSH2Packet
리턴 SSH2Packet

Close() 공개 메소드

Close this channel.
After calling this method, all mothods of the ISSHChannel will throw SSHChannelInvalidOperationException. If this method was called under the inappropriate channel state, the method call will be ignored silently.
public Close ( ) : void
리턴 void

Die() 보호된 메소드

Notifies terminating this channel.
protected Die ( ) : void
리턴 void

OnChannelEstablished() 보호된 메소드

Do additional work when State was changed to State.Established.
protected OnChannelEstablished ( ) : void
리턴 void

ProcessPacket() 공개 메소드

Process packet about this channel.
public ProcessPacket ( SSH2PacketType packetType, Granados.IO.DataFragment packetFragment ) : void
packetType SSH2PacketType a packet type (message number)
packetFragment Granados.IO.DataFragment a packet image except message number and recipient channel.
리턴 void

ProcessPacketSub() 보호된 메소드

Process packet additionally.
This method will be called repeatedly while State is State.Established or State.Ready.
protected ProcessPacketSub ( SSH2PacketType packetType, Granados.IO.DataFragment packetFragment ) : SubPacketProcessResult
packetType SSH2PacketType a packet type (message number)
packetFragment Granados.IO.DataFragment a packet image except message number and recipient channel.
리턴 SubPacketProcessResult

RequestFailed() 보호된 메소드

The derived class can change state from "Established" to "Closing" by calling this method.
protected RequestFailed ( ) : void
리턴 void

ResizeTerminal() 공개 메소드

Send window dimension change message.
the channel is already closed.
public ResizeTerminal ( uint width, uint height, uint pixelWidth, uint pixelHeight ) : void
width uint terminal width, columns
height uint terminal height, rows
pixelWidth uint terminal width, pixels
pixelHeight uint terminal height, pixels
리턴 void

SSH2ChannelBase() 공개 메소드

Constructor (initiated by client)
public SSH2ChannelBase ( IPacketSender packetSender, SSHConnectionParameter param, SSHProtocolEventManager protocolEventManager, uint localChannel, ChannelType channelType, string channelTypeString ) : System
packetSender IPacketSender
param SSHConnectionParameter
protocolEventManager SSHProtocolEventManager
localChannel uint
channelType ChannelType
channelTypeString string
리턴 System

SSH2ChannelBase() 공개 메소드

Constructor (initiated by server)
public SSH2ChannelBase ( IPacketSender packetSender, SSHConnectionParameter param, SSHProtocolEventManager protocolEventManager, uint localChannel, uint remoteChannel, ChannelType channelType, string channelTypeString, uint serverWindowSize, uint serverMaxPacketSize ) : System
packetSender IPacketSender
param SSHConnectionParameter
protocolEventManager SSHProtocolEventManager
localChannel uint
remoteChannel uint
channelType ChannelType
channelTypeString string
serverWindowSize uint
serverMaxPacketSize uint
리턴 System

Send() 공개 메소드

Send data.
the channel is already closed.
public Send ( Granados.IO.DataFragment data ) : void
data Granados.IO.DataFragment data to send
리턴 void

SendBreak() 공개 메소드

Send Break. (SSH2, session channel only)
the channel is already closed.
public SendBreak ( int breakLength ) : bool
breakLength int break-length in milliseconds
리턴 bool

SendEOF() 공개 메소드

Send EOF.
the channel is already closed.
public SendEOF ( ) : void
리턴 void

SendOpen() 공개 메소드

Sends SSH_MSG_CHANNEL_OPEN
public SendOpen ( ) : void
리턴 void

SendOpenConfirmation() 공개 메소드

Sends SSH_MSG_CHANNEL_OPEN_CONFIRMATION
inappropriate channel state
public SendOpenConfirmation ( ) : void
리턴 void

SendRequest() 보호된 메소드

Sends SSH_MSG_CHANNEL_REQUEST packet (no response)
protected SendRequest ( SSH2Packet requestPacket ) : void
requestPacket SSH2Packet SSH_MSG_CHANNEL_REQUEST packet
리턴 void

SendRequestAndWaitResponseAsync() 보호된 메소드

Sends SSH_MSG_CHANNEL_REQUEST packet and wait response asynchronously.
protected SendRequestAndWaitResponseAsync ( SSH2Packet requestPacket ) : Task
requestPacket SSH2Packet SSH_MSG_CHANNEL_REQUEST packet
리턴 Task

SetHandler() 공개 메소드

Sets handler
public SetHandler ( ISSHChannelEventHandler handler ) : void
handler ISSHChannelEventHandler
리턴 void

SetStateReady() 보호된 메소드

The derived class can change state from "Established" to "Ready" by calling this method.
protected SetStateReady ( ) : void
리턴 void

Trace() 보호된 메소드

Outputs Trace message.
protected Trace ( string format ) : void
format string format string
리턴 void

Transmit() 보호된 메소드

Sends a packet.
protected Transmit ( int consumedSize, SSH2Packet packet ) : void
consumedSize int consumed window size.
packet SSH2Packet packet object
리턴 void

WaitReady() 공개 메소드

Block execution of the current thread until the channel is ready for the communication.
public WaitReady ( ) : bool
리턴 bool