-
This also adds configuration options for choosing what address to bind to.
-
Found by fuzzing.
-
Probably I also need a flag to fake already being upgraded, because otherwise we never get passed the complicated websocket handshake.
-
And check Qos.
-
This can be called by a fuzzer like afl-fuzz.
-
When sending many 0xFF, it would overflow. Found by using afl-fuzz.
-
This fixes the 100ms wait time requirement.
-
This allows creation of multiple listeners, with different protocols and/or SSL certificates. Related change: settings is now a class that is copyable and assignable, and is done so to each thread on reload. Semi-related fix: fix crash in quit when multiple threads initiated it. This came to light when testing the auth plugin settings.
-
And fixed an assert in CirBuf.read().
-
The ping/pong is actually untested at this point, because Paho (my test client for now) doesn't do those. I wonder if any do, because MQTT already has ping/pong.
-
It's also used to reload settings. Settings are copied to threads, to avoid concurrency issues.
-
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.
-
And some side issues.
-
And include some extra error conditions.
-
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
-
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.