From 3d56501834dc49aac15a119198d5c1953734a3bc Mon Sep 17 00:00:00 2001 From: Wiebe Cazemier Date: Sun, 3 Apr 2022 19:01:33 +0200 Subject: [PATCH] TODOs --- mqttpacket.cpp | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/mqttpacket.cpp b/mqttpacket.cpp index 9efa540..ea2cb5a 100644 --- a/mqttpacket.cpp +++ b/mqttpacket.cpp @@ -50,6 +50,8 @@ MqttPacket::MqttPacket(const ConnAck &connAck) : if (connAck.protocol_version >= ProtocolVersion::Mqtt5) { + // TODO: don't include the reason string and user properties when it would increase the CONACK packet beyond the max packet size as determined by client. + // We don't send those at all momentarily, so there is no logic to prevent it. writeProperties(connAck.propertyBuilder); } @@ -65,6 +67,8 @@ MqttPacket::MqttPacket(const SubAck &subAck) : if (subAck.protocol_version >= ProtocolVersion::Mqtt5) { + // TODO: don't include the reason string and user properties when it would increase the SUBACK packet beyond the max packet size as determined by client. + // We don't send those at all momentarily, so there is no logic to prevent it. writeProperties(subAck.propertyBuilder); } @@ -180,6 +184,8 @@ MqttPacket::MqttPacket(const PubResponse &pubAck) : if (pubAck.needsReasonCode()) { + // TODO: don't include the reason string and user properties when it would increase the PUBACK/PUBREL/PUBCOMP packet beyond the max packet size as determined by client. + // We don't send those at all momentarily, so there is no logic to prevent it. writeByte(static_cast(pubAck.reason_code)); } } -- libgit2 0.21.4