Enumeration ConnectReasonCode

Server return code for connect attempts.

Enum values match MQTT5 spec encoding values.

Enumeration Members

BadAuthenticationMethod: 140

Returned when the authentication method used in the connection is either not supported on the server or it does not match the authentication method currently in use in the CONNECT packet.

BadUsernameOrPassword: 134

Returned when the server does not accept the username and/or password specified by the client in the connection packet.

Banned: 138

Returned when the client has been banned by the server.

ClientIdentifierNotValid: 133

Returned when the client identifier in the CONNECT packet is a valid string but not one that is allowed on the server.

ConnectionRateExceeded: 159

Returned when the server connection rate limit has been exceeded.

ImplementationSpecificError: 131

Returned when the CONNECT packet is valid but was not accepted by the server.

MalformedPacket: 129

Returned when data in the CONNECT packet could not be correctly parsed by the server.

NotAuthorized: 135

Returned when the client is not authorized to connect to the server.

PacketTooLarge: 149

Returned when the connection packet exceeded the maximum permissible size on the server.

PayloadFormatInvalid: 153

Returned when the Will payload in the CONNECT packet does not match the specified payload format indicator.

ProtocolError: 130

Returned when data in the CONNECT packet does not conform to the MQTT5 specification requirements.

QosNotSupported: 155

Returned when the server does not support the QOS setting in the Will QOS in the connection packet.

QuotaExceeded: 151

Returned when the quota limits set on the server have been met and/or exceeded.

RetainNotSupported: 154

Returned when the server does not retain messages but the connection packet on the client had Will retain enabled.

ServerBusy: 137

Returned when the server is too busy to make a connection. It is recommended that the client try again later.

ServerMoved: 157

Returned when the server is telling the client to permanently use another server instead of the one they are trying to connect to.

ServerUnavailable: 136

Returned when the MQTT5 server is not available.

Success: 0

Returned when the connection is accepted.

TopicNameInvalid: 144

Returned when the Will topic name sent in the connection packet is correctly formed, but is not accepted by the server.

UnspecifiedError: 128

Returned when the server has a failure but does not want to specify a reason or none of the other reason codes apply.

UnsupportedProtocolVersion: 132

Returned when the server does not support MQTT5 protocol version specified in the connection.

UseAnotherServer: 156

Returned when the server is telling the client to temporarily use another server instead of the one they are trying to connect to.

Generated using TypeDoc