Commit 3d56501834dc49aac15a119198d5c1953734a3bc
1 parent
af89bf90
TODOs
Showing
1 changed file
with
6 additions
and
0 deletions
mqttpacket.cpp
| ... | ... | @@ -50,6 +50,8 @@ MqttPacket::MqttPacket(const ConnAck &connAck) : |
| 50 | 50 | |
| 51 | 51 | if (connAck.protocol_version >= ProtocolVersion::Mqtt5) |
| 52 | 52 | { |
| 53 | + // 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. | |
| 54 | + // We don't send those at all momentarily, so there is no logic to prevent it. | |
| 53 | 55 | writeProperties(connAck.propertyBuilder); |
| 54 | 56 | } |
| 55 | 57 | |
| ... | ... | @@ -65,6 +67,8 @@ MqttPacket::MqttPacket(const SubAck &subAck) : |
| 65 | 67 | |
| 66 | 68 | if (subAck.protocol_version >= ProtocolVersion::Mqtt5) |
| 67 | 69 | { |
| 70 | + // 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. | |
| 71 | + // We don't send those at all momentarily, so there is no logic to prevent it. | |
| 68 | 72 | writeProperties(subAck.propertyBuilder); |
| 69 | 73 | } |
| 70 | 74 | |
| ... | ... | @@ -180,6 +184,8 @@ MqttPacket::MqttPacket(const PubResponse &pubAck) : |
| 180 | 184 | |
| 181 | 185 | if (pubAck.needsReasonCode()) |
| 182 | 186 | { |
| 187 | + // 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. | |
| 188 | + // We don't send those at all momentarily, so there is no logic to prevent it. | |
| 183 | 189 | writeByte(static_cast<uint8_t>(pubAck.reason_code)); |
| 184 | 190 | } |
| 185 | 191 | } | ... | ... |