Method | Description | |
---|---|---|
Dispose ( ) : void |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
|
SendData ( byte data ) : void |
Sends a SSH_MSG_CHANNEL_DATA message with the specified payload.
|
|
SendData ( byte data, int offset, int size ) : void |
Sends a SSH_MSG_CHANNEL_DATA message with the specified payload. When the size of the data to send exceeds the maximum packet size or the remote window size does not allow the full data to be sent, then this method will send the data in multiple chunks and will wait for the remote window size to be adjusted when it's zero. This is done to support SSH servers will a small window size that do not agressively increase their window size. We need to take into account that there may be SSH servers that only increase their window size when it has reached zero. |
|
SendEof ( ) : void |
Sends a SSH_MSG_CHANNEL_EOF message to the remote server.
|
Method | Description | |
---|---|---|
Channel ( ISession session, uint localChannelNumber, uint localWindowSize, uint localPacketSize ) : System |
Initializes a new Channel instance.
|
|
Close ( ) : void |
Closes the channel, waiting for the SSH_MSG_CHANNEL_CLOSE message to be received from the server.
|
|
Dispose ( bool disposing ) : void |
Releases unmanaged and - optionally - managed resources
|
|
InitializeRemoteInfo ( uint remoteChannelNumber, uint remoteWindowSize, uint remotePacketSize ) : void | ||
OnChannelException ( |
Called when an Exception occurs while processing a channel message. This method will in turn invoke OnErrorOccured(System.Exception), and raise the Exception event. |
|
OnClose ( ) : void |
Called when channel is closed by the server.
|
|
OnData ( byte data ) : void |
Called when channel data is received.
|
|
OnDisconnected ( ) : void | ||
OnEof ( ) : void |
Called when channel has no more data to receive.
|
|
OnErrorOccured ( |
||
OnExtendedData ( byte data, uint dataTypeCode ) : void |
Called when channel extended data is received.
|
|
OnFailure ( ) : void |
Called when channel request failed.
|
|
OnRequest ( |
Called when channel request received.
|
|
OnSuccess ( ) : void |
Called when channel request was successful
|
|
OnWindowAdjust ( uint bytesToAdd ) : void |
Called when channel window need to be adjust.
|
|
RaiseExceptionEvent ( |
Raises Channel.Exception event.
|
|
SendMessage ( Message message ) : void |
Sends SSH message to the server.
|
|
WaitOnHandle ( |
Waits for the handle to be signaled or for an error to occurs.
|
Method | Description | |
---|---|---|
AdjustDataWindow ( byte messageData ) : void | ||
CreateChannelClosedException ( ) : |
||
CreateRemoteChannelInfoNotAvailableException ( ) : |
||
GetDataLengthThatCanBeSentInMessage ( int messageLength ) : int |
Determines the length of data that currently can be sent in a single message.
|
|
OnChannelClose ( object sender, MessageEventArgs |
||
OnChannelData ( object sender, MessageEventArgs |
||
OnChannelEof ( object sender, MessageEventArgs |
||
OnChannelExtendedData ( object sender, MessageEventArgs |
||
OnChannelFailure ( object sender, MessageEventArgs |
||
OnChannelRequest ( object sender, MessageEventArgs |
||
OnChannelSuccess ( object sender, MessageEventArgs |
||
OnChannelWindowAdjust ( object sender, MessageEventArgs |
||
Session_Disconnected ( object sender, |
||
Session_ErrorOccured ( object sender, ExceptionEventArgs e ) : void | ||
TrySendMessage ( Message message ) : bool |
Sends a message to the server. This methods returns |
protected Channel ( 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. |
return | System |
protected Dispose ( bool disposing ) : void | ||
disposing | bool | |
return | void |
protected InitializeRemoteInfo ( uint remoteChannelNumber, uint remoteWindowSize, uint remotePacketSize ) : void | ||
remoteChannelNumber | uint | |
remoteWindowSize | uint | |
remotePacketSize | uint | |
return | void |
protected OnChannelException ( |
||
ex | The |
|
return | void |
protected OnErrorOccured ( |
||
exp | ||
return | void |
protected OnExtendedData ( byte data, uint dataTypeCode ) : void | ||
data | byte | The data. |
dataTypeCode | uint | The data type code. |
return | void |
protected OnRequest ( |
||
info | Channel request information. | |
return | void |
protected OnWindowAdjust ( uint bytesToAdd ) : void | ||
bytesToAdd | uint | The bytes to add. |
return | void |
protected RaiseExceptionEvent ( |
||
exception | The exception. | |
return | void |
public SendData ( byte data ) : void | ||
data | byte | The payload to send. |
return | void |
public SendData ( byte data, int offset, int size ) : void | ||
data | byte | An array of |
offset | int | The zero-based offset in |
size | int | The number of bytes of |
return | void |
protected SendMessage ( Message message ) : void | ||
message | Message | The message. |
return | void |
protected WaitOnHandle ( |
||
waitHandle | The wait handle. | |
return | void |