94 if (!is_int($reasonCode)) {
95 throw new \InvalidArgumentException();
97 if (!is_string($reasonMessage)) {
98 throw new \InvalidArgumentException();
101 throw new \InvalidArgumentException();
104 parent::__construct($reasonMessage, $reasonCode);
115 $encoder->encodeUint32($this->code);
116 $encoder->encodeString($this->message);
117 $encoder->encodeString($this->language);
124 $decoder->decodeUint32(),
125 $decoder->decodeString(),
126 $decoder->decodeString()
const SSH_DISCONNECT_BY_APPLICATION
Disconnected by the application layer.
const SSH_DISCONNECT_ILLEGAL_USER_NAME
Disconnected due to an illegal user name.
const SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE
Disconnected due to an unverifiable host key.
$language
Language the disconnection message is written into (from RFC 3066).
const SSH_DISCONNECT_SERVICE_NOT_AVAILABLE
Disconnected because the requested service is not available.
const SSH_DISCONNECT_AUTH_CANCELLED_BY_USER
Disconnected due to authentication cancelation.
$message
Disconnection message (human-readable description in UTF-8 encoding).
const SSH_DISCONNECT_CONNECTION_LOST
Disconnected due to connection loss.
const SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT
Disconnected because the remote host is not allowed to connect.
const SSH_DISCONNECT_KEY_EXCHANGE_FAILED
Disconnected due to key exchange failure.
const SSH_DISCONNECT_TOO_MANY_CONNECTIONS
Disconnected because too many connections are currently opened.
const SSH_DISCONNECT_PROTOCOL_ERROR
Disconnected due to a protocol error.
const SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED
Disconnected due to an unsupported protocol version being requested.
__construct($reasonCode=0, $reasonMessage= '', $language= '')
const SSH_DISCONNECT_MAC_ERROR
Disconnected due to a Message Authentication Code error.
serialize(\fpoirotte\Pssht\Wire\Encoder $encoder)
const SSH_DISCONNECT_RESERVED
Disconnected due to a reserved error.
const SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE
Disconnected because no more authentication methods are available.
const SSH_DISCONNECT_COMPRESSION_ERROR
Disconnected due to a compression error.
$code
Disconnection reason.
static unserialize(\fpoirotte\Pssht\Wire\Decoder $decoder)