The DISCONNECT message is sent from the client to the broker to
indicate that it is about to close its TCP/IP connection. This allows for
a "clean" disconnection, rather than just dropping the line.
Note that by sending the DISCONNECT message, the client is not implying
anything about existing subscriptions: the subscriptions are persistant
until either explicitly UNSUBSCRIBEd, or
when there is a "clean start". QoS1
and QoS2 messages on topics to which the client is SUBSCRIBEd
will be stored at the broker until the client reCONNECTs.
QoS0 messages will not be retained, as they are delivered on a "best can
do" basis.
bit |
|
|
|
|
|
|
|
|
byte 1 |
|
|
|
|
||||
|
|
|
|
|
|
|
|
|
byte 2 |
|
|||||||
|
|
|
|
|
|
|
|
|
The DUP, QoS and RETAIN flags are not used in the DISCONNECT message.
BACK to index