MqttConnectionCode 常量
MQTT 客户端尝试建立连接后返回的值,表示连接行为的结果。
MqttConnectionAdministrativeAction
(152) - 由于管理操作,连接已关闭。MqttConnectionBadAuthenticationMethod
(140) - 身份验证方法不受支持,或者与当前正在使用的身份验证方法不匹配。MqttConnectionBadUserNameOrPassword
(134) - 服务器不接受客户端指定的用户名或密码。MqttConnectionBanned
(138) - 客户端已被管理操作禁止。请与服务器管理员联系。MqttConnectionClientIdentifierNotValid
(133) - 客户端标识符是有效字符串,但服务器不允许该标识符。MqttConnectionImplementationSpecificError
(131) - 连接有效,但服务器不接受该连接。MqttConnectionKeepAliveTimeout
(141) - 连接已关闭,因为在 1.5 倍的持活时间内未收到任何数据包。MqttConnectionMalformedPacket
(129) - 无法正确解析连接数据包内的数据。MqttConnectionMaximumConnectTime
(160) - 已超过为此连接授权的最大连接时间。MqttConnectionNotAuthorized
(135) - 客户端未获得连接的授权。MqttConnectionPacketIdentifierInUse
(145) - 数据包标识符已在使用中。这可能表示客户端与服务器之间的会话状态不匹配。MqttConnectionPacketTooLarge
(149) - 连接数据包超过允许的最大大小。MqttConnectionPayloadFormatInvalid
(153) - 遗嘱有效负载与指定的有效负载格式指示器不匹配。MqttConnectionProtocolError
(130) - 连接数据包中的数据不符合此规范。MqttConnectionQoSNotSupported
(155) - 服务器不支持在遗嘱 QoS 中设置的 QoS。MqttConnectionQuotaExceeded
(151) - 已超过实现或管理限制。MqttConnectionRateExceeded
(159) - 已超过连接速率限制。MqttConnectionReceiveMaximumExceeded
(147) - 客户端或服务器接收的发布数超过接收最大值,因尚未发送 PUBACK 或 PUBCOMP。MqttConnectionRetainNotSupported
(154) - 服务器不支持保留消息,而遗嘱保留设置为 1。MqttConnectionServerBusy
(137) - 服务器繁忙。请稍后重试。MqttConnectionServerMoved
(157) - 客户端应永久使用其他服务器。MqttConnectionServerShuttingDown
(139) - 服务器正在关闭。MqttConnectionServerUnavailable
(136) - MQTT 服务器不可用。MqttConnectionSessionTakenOver
(142) - 已连接使用同一客户端 ID 的其他连接,从而导致此连接关闭。MqttConnectionSuccess
(0) - 已接受连接。MqttConnectionTopicNameinvalid
(144) - 遗嘱主题名称的格式没有错误,但此服务器不接受该名称。MqttConnectionUnspecifiedError
(128) - 服务器不希望透露失败的原因,或者其他原因代码都不适用。MqttConnectionUnsupportedProtocolVersion
(132) - 服务器不支持客户端请求的 MQTT 协议版本。MqttConnectionUseAnotherServer
(156) - 客户端应暂时使用其他服务器。提供反馈