<PackageReference Include="SSH.NET" Version="2020.0.2" />

Renci.SshNet.Channels.Channel

abstract class Channel : IChannel, IDisposable
Represents base class for SSH channel implementations.
namespace Renci.SshNet.Channels { internal abstract class Channel : IChannel, IDisposable { protected ISession Session { get; } public abstract ChannelTypes ChannelType { get; } public uint LocalChannelNumber { get; } public uint LocalPacketSize { get; } public uint LocalWindowSize { get; } public uint RemoteChannelNumber { get; } public uint RemotePacketSize { get; } public uint RemoteWindowSize { get; } public bool IsOpen { get; set; } protected bool IsConnected { get; } protected IConnectionInfo ConnectionInfo { get; } protected SemaphoreLight SessionSemaphore { get; } public event EventHandler<ExceptionEventArgs> Exception; public event EventHandler<ChannelDataEventArgs> DataReceived; public event EventHandler<ChannelExtendedDataEventArgs> ExtendedDataReceived; public event EventHandler<ChannelEventArgs> EndOfData; public event EventHandler<ChannelEventArgs> Closed; public event EventHandler<ChannelRequestEventArgs> RequestReceived; public event EventHandler<ChannelEventArgs> RequestSucceeded; public event EventHandler<ChannelEventArgs> RequestFailed; protected Channel(ISession session, uint localChannelNumber, uint localWindowSize, uint localPacketSize); protected void InitializeRemoteInfo(uint remoteChannelNumber, uint remoteWindowSize, uint remotePacketSize); public void SendData(byte[] data); public void SendData(byte[] data, int offset, int size); protected virtual void OnWindowAdjust(uint bytesToAdd); protected virtual void OnData(byte[] data); protected virtual void OnExtendedData(byte[] data, uint dataTypeCode); protected virtual void OnEof(); protected virtual void OnClose(); protected virtual void OnRequest(RequestInfo info); protected virtual void OnSuccess(); protected virtual void OnFailure(); protected void SendMessage(Message message); public void SendEof(); protected void WaitOnHandle(WaitHandle waitHandle); protected virtual void Close(); protected virtual void OnDisconnected(); protected virtual void OnErrorOccured(Exception exp); protected void OnChannelException(Exception ex); public void Dispose(); protected virtual void Dispose(bool disposing); } }