SshConnectionException
The exception that is thrown when connection was terminated.
using Renci.SshNet.Messages.Transport;
using System;
namespace Renci.SshNet.Common
{
public class SshConnectionException : SshException
{
public DisconnectReason DisconnectReason { get; set; }
public SshConnectionException()
{
}
public SshConnectionException(string message)
: base(message)
{
DisconnectReason = DisconnectReason.None;
}
public SshConnectionException(string message, DisconnectReason disconnectReasonCode)
: base(message)
{
DisconnectReason = disconnectReasonCode;
}
public SshConnectionException(string message, DisconnectReason disconnectReasonCode, Exception inner)
: base(message, inner)
{
DisconnectReason = disconnectReasonCode;
}
}
}