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

SubsystemSession

public abstract class SubsystemSession : IDisposable
Base class for SSH subsystem implementations

Specifies a timeout to wait for operation to complete

protected uint ChannelNumber { get; }

Gets the channel number.

protected Encoding Encoding { get; }

Occurs when session has been disconnected form the server.

Occurs when an error occurred.

public SubsystemSession(Session session, string subsystemName, TimeSpan operationTimeout, Encoding encoding)

Initializes a new instance of the SubsystemSession class.

public void Connect()

Connects subsystem on SSH channel.

public void Disconnect()

Disconnects subsystem channel.

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 abstract void OnChannelOpen()

Called when channel is open.

protected abstract void OnDataReceived(uint dataTypeCode, byte[] data)

Called when data is received.

protected void RaiseError(Exception error)

Raises the error.

public void SendData(byte[] data)

Sends data to the subsystem.