-
This includes a timer mechanism.
-
It also contains some related improvements that I needed: * Show disconnect reason * Fix the while condition for doing write() to avoid an unnecessary call * Config reloading logic
-
Also includes fixes to packet parsing that I couldn't make a separate commit for. When it comes to QoS 1, these things are still left, off the top of my head: - vector for qos queue? It helps with ordering and is CPU cache friendly. - Store subscription QoS. - Do retained messages have QoS? - Give session client's name, to access it later.
-
Also reloading of settings, which re-opens the log file.
-
The test cases give a bunch of warnings, but that's the COMPARE macro's fault. Let's see what to do...
-
The MQTT docs showed a wrong condition for checking malformed packets. And, we have to grow buffers to MAX_PACKET_SIZE, otherwise we can't process. I still have some inteligent buffer shrink logic in mind.
-
There still is a bug: writing a very big packet. I wrote the test case already.
-
Because the connectionClose would set fd=-1, clients were never properly removed from the map, because the fd is the key. Also fixed a locking issue when an exception happened.
-
Also materializes some concepts about MqttPacket.
-
Roughly...
-
And I had to fix a threading bug.