-
This makes much more sense than returning the amount of messages sent all the way up the call stack.
-
They don't need object state.
-
There's no point in keeping a vector per nanosecond.
-
There's no point in keeping a vector of removals per nanosecond.
-
This is fast(er).
-
This is way faster.
-
It merely drops packets when they exceed it. The specs are unclear about whether you're supposed to delay transmission until the quota is non-negative again. I decided against it because of increased complexity, and because on a continously overloaded client, this makes no sense. Effectively, this formalizes the 'max qos pending' mechanism that was already in place. It also includes PUBACK/PUBREL/PUBCOMP error handling, because that needed to be done for proper quota control.
-
This required a special type WillPublish to make this easier and more logical.
-
This is better in line with how the copy factory is meant to be used. It actually broke on the assert on 'externallyReceived' before.
-
This allows easier saving of MQTT5 properties, for which a new file version for retained messages is created. It uses the packet parsing logic.
-
- Delay is properly counted from moment of disconnect. - When a session is picked up again, the will is not sent. - An actual fix to what I tried a few commits ago: fix sending will twice. This logic should make storing wills also easier.
-
This replaces the old style checking of expired sessions once every 10 minutes or so.
-
The behavior for MQTT3 clients in the same, but I replaced the term 'clean session' and described the behavior in MQTT5 terms, of 'clean start' and an expiry interval.
-
Most of it is limits we already implemented non-standard compliant.
-
This entails making copies of the original packet when necessary, because QoS 0 doesn't have a packet id. I tried to keep it to an absolute minimum and do some precarious optmizations for it. There are tests though.
-
The initial concept of iterating over a vector being fast didn't help, and made having many subscribers to one topic very slow.
-
Mandatory normative statement MQTT-3.1.2-6.
-
One was confirmed: writing an mqtt packet into a client that disconnected after checking the weak pointer for validity. The rest made sense to change as well.
-
Files are simple serialized bytes prefaced by lengths. File is hashed to verify integrity. This was also a good way preventing unexpected errors when trying to crash the parser by having it load a different file. This change includes some refactoring that was necessary: - It 'fixes' looking at the wrong thread's authentiction. This is still wrong though. It will be fixed by a thread local pointer in the next commit. - Deadlocks with yourself are handled in rwlockguard. - QoSPacketQueue is now a class. - Probably other tweaks.
-
This performs a whole lot better.
-
Also include a few stats.
-
Unsubscribing paths that didn't exist caused creation of null nodes, which subsequent use of the tree crashed on.
-
My IDE didn't understand them for finding symbols, apparently.
-
Also changed the disconnect reason a little: it now shows them all, so I don't have to worry about which one is more important.
-
This includes a timer mechanism.