Interface DisconnectPacket

Data model of an MQTT5 DISCONNECT packet.

Hierarchy

Properties

Value indicating the reason that the sender is closing the connection

See MQTT5 Disconnect Reason Code

reasonString?: string

Additional diagnostic information about the reason that the sender is closing the connection

See MQTT5 Reason String

serverReference?: string

Property indicating an alternate server that the client may temporarily or permanently attempt to connect to instead of the configured endpoint. Will only be set if the reason code indicates another server may be used (ServerMoved, UseAnotherServer).

See MQTT5 Server Reference

sessionExpiryIntervalSeconds?: number

Requests a change to the session expiry interval negotiated at connection time as part of the disconnect. Only valid for DISCONNECT packets sent from client to server. It is not valid to attempt to change session expiry from zero to a non-zero value.

See MQTT5 Session Expiry Interval

type?: PacketType

Always set on packets coming from the client to the user. Ignored if set on packets that come from the user to the client.

The primary use is to allow users to distinguish between packets in polymorphic situations (for example, the result of a publish attempt which might be a Puback (QoS 1) or Pubcomp (QoS 2, when we support it).

userProperties?: UserProperty[]

Set of MQTT5 user properties included with the packet.

See MQTT5 User Property

Generated using TypeDoc