<PackageReference Include="SSH.NET" Version="2014.4.6-beta1" />

Channel

abstract class Channel : IDisposable
Represents base class for SSH channel implementations.
public abstract ChannelTypes ChannelType { get; }

Gets the type of the channel.

protected ConnectionInfo ConnectionInfo { get; }

Gets the connection info.

protected bool IsConnected { get; }

Gets a value indicating whether the session is connected.

public bool IsOpen { get; protected set; }

Gets a value indicating whether this channel is open.

public uint LocalChannelNumber { get; }

Gets the local channel number.

public uint LocalPacketSize { get; }

Gets the maximum size of a packet.

public uint LocalWindowSize { get; }

Gets the size of the local window.

public uint RemoteChannelNumber { get; }

Gets the remote channel number.

public uint RemotePacketSize { get; }

Gets the maximum size of a data packet that we can send using the channel.

public uint RemoteWindowSize { get; }

Gets the window size of the remote server.

protected Session Session { get; }

Gets the session.

protected SemaphoreLight SessionSemaphore { get; }

Gets the session semaphore to control number of session channels

Occurs when ChannelCloseMessage message received

Occurs when ChannelDataMessage message received

Occurs when ChannelEofMessage message received

Occurs when ChannelExtendedDataMessage message received

Occurs when ChannelFailureMessage message received

Occurs when ChannelRequestMessage message received

Occurs when ChannelSuccessMessage message received

protected Channel()

public virtual void Close()

Closes the channel.

protected virtual void Close(bool wait)

public void Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

protected virtual void Dispose(bool disposing)

Releases unmanaged and - optionally - managed resources

protected void InitializeRemoteInfo(uint remoteChannelNumber, uint remoteWindowSize, uint remotePacketSize)

protected virtual void OnClose()

Called when channel is closed by the server.

protected virtual void OnData(byte[] data)

Called when channel data is received.

protected virtual void OnDisconnected()

protected virtual void OnEof()

Called when channel has no more data to receive.

protected virtual void OnErrorOccured(Exception exp)

protected virtual void OnExtendedData(byte[] data, uint dataTypeCode)

Called when channel extended data is received.

protected virtual void OnFailure()

Called when channel request failed.

protected virtual void OnRequest(RequestInfo info)

Called when channel request received.

protected virtual void OnSuccess()

Called when channel request was successful

protected virtual void OnWindowAdjust(uint bytesToAdd)

Called when channel window need to be adjust.

protected void SendMessage(Message message)

Sends SSH message to the server.

protected void SendMessage(ChannelDataMessage message)

Sends channel data message to the servers.

protected void SendMessage(ChannelExtendedDataMessage message)

Sends channel extended data message to the servers.

protected void WaitOnHandle(WaitHandle waitHandle)

Waits for the handle to be signaled or for an error to occurs.