You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bit position of the "WillRetain" flag is according to MQTT v3.1.1: CONNECT message: Variable Header - Byte 8: Connect Flags
Bit 7: User Name Flag ($80)
Bit 6: Password Flag ($40)
Bit 5: Will Retain Flag ($20)
Bits 4-3: Will QoS ($18)
Bit 2: Will Flag ($04)
Bit 1: Clean Session ($02)
Bit 0: 0 (Reserved) ($01)
So the bit position of the "WillRetain" flag must be corrected to $20 in:
-> procedure TMQTTParser.SendConnect(aClientID, aUsername, aPassword : UTF8String;
if WillRetain then
x := x or $20;
-> procedure TMQTTParser.Parse(aStream: TStream);
wr := (fl and $20) > 0; // will retain
-> procedure TMQTTParser.SendBrokerConnect(aClientID, aUsername,
if WillRetain then
x := x or $20;
The text was updated successfully, but these errors were encountered:
The bit position of the "WillRetain" flag is according to MQTT v3.1.1: CONNECT message: Variable Header - Byte 8: Connect Flags
Bit 7: User Name Flag ($80)
Bit 6: Password Flag ($40)
Bit 5: Will Retain Flag ($20)
Bits 4-3: Will QoS ($18)
Bit 2: Will Flag ($04)
Bit 1: Clean Session ($02)
Bit 0: 0 (Reserved) ($01)
So the bit position of the "WillRetain" flag must be corrected to $20 in:
-> procedure TMQTTParser.SendConnect(aClientID, aUsername, aPassword : UTF8String;
if WillRetain then
x := x or $20;
-> procedure TMQTTParser.Parse(aStream: TStream);
wr := (fl and $20) > 0; // will retain
-> procedure TMQTTParser.SendBrokerConnect(aClientID, aUsername,
if WillRetain then
x := x or $20;
The text was updated successfully, but these errors were encountered: