-
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
-
Connected to this is preventing duplicate subscriptions. It's a bit unclear what to do when you get a subscription for the same topic with a different QoS? Change the Qos? Ignore?
-
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.
-
In preparation for clean session and qos.
-
It can be defined in the config file, along with options.
-
I kind of need a config file parser first, so I'm going to make that.
-
This saves mildly costly calls to find().
-
It's a little faster.
-
We use epoll now to change readiness.
-
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.