Class: EventMachine::Ssh::Disconnect

Inherits:
SshError
  • Object
show all
Defined in:
lib/em-ssh.rb

Defined Under Namespace

Classes: AuthCancelledByUser, ByApplication, CompressionError, ConnectionLost, HostKeyNotVerifiable, HostNotAllowedToConnect, IllegalUserName, KeyExchangeFailed, MacError, NoMoreAuthMethodsAvailable, ProtocolError, ProtocolVersionNotSupported, Reserved, ServiceNotAvailable, TooManyConnections

Constant Summary collapse

CODES =
[
  Disconnect,
  HostNotAllowedToConnect,
  ProtocolError,
  KeyExchangeFailed,
  Reserved,
  MacError,
  CompressionError,
  ServiceNotAvailable,
  ProtocolVersionNotSupported,
  HostKeyNotVerifiable,
  ConnectionLost,
  ByApplication,
  TooManyConnections,
  AuthCancelledByUser,
  NoMoreAuthMethodsAvailable,
  IllegalUserName,
]

Class Method Summary collapse

Class Method Details

.from_packet(packet) ⇒ Object



67
68
69
# File 'lib/em-ssh.rb', line 67

def from_packet(packet)
  (CODES[packet[:reason_code]] || Disconnect).new(packet[:description])
end