Logo white

Peter M. Groen / FlashMQ

Sign in
  • Sign in
  • Project
  • Files
  • Commits
  • Network
  • Graphs
  • Milestones
  • Issues 0
  • Merge Requests 0
  • Labels
  • Wiki
  • Commits 453
  • Compare
  • Branches 1
  • Tags 0
  • FlashMQ
  • client.cpp
20 Mar, 2021
38 commits
  • Add license
    60b9cd16
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Auto-detect fuzzing mode, and don't make threads ...
    1f84a1ef
    Having threads creates instability for the fuzzer, and we don't need
    them.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Add fuzz mode by feeding a client from a file ...
    d6af7d82
    This can be called by a fuzzer like afl-fuzz.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Fix packet parsing bug ...
    6e92c053
    When sending many 0xFF, it would overflow.
    
    Found by using afl-fuzz.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Support generic listener in config file ...
    5d72070e
    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.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Use timer for resetting buffers
    e5746d7f
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Refactor code to use new interface on CirBuf ...
    468ca477
    And fixed an assert in CirBuf.read().
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Add IoWrapper, with websocket support added ...
    b5ba41f5
    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.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Buffer size and max packet size as setting
    1106e210
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Add will support ...
    99a087f4
    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.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Deal with clientid protocol version-appropriate ...
    1f378699
    And include some extra error conditions.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Working on expiring sessions ...
    33ef5bdf
    This includes a timer mechanism.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Add SSL support ...
    9e33ebda
    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
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • QoS 1, 80% ...
    760ec588
    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.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Improve disconnect handling
    a0070c99
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Settings and logger stuff ...
    d55f39d1
    Also reloading of settings, which re-opens the log file.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Simple protection against growing write buffer
    5d84ff29
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Sessions and 'clean session' works
    862f0933
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Simple keep-alive mechanism
    f8e062bf
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Reduce client buffers periodically ...
    497bc9eb
    The test cases give a bunch of warnings, but that's the COMPARE macro's
    fault. Let's see what to do...
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Fix bug in max packet size and big packet handling ...
    a0596b6e
    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.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Fix write buffer bug: wasn't increased enough ...
    502ffeec
    There still is a bug: writing a very big packet. I wrote the test case
    already.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Circbuf for write buffer
    121e04de
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Use proper circular buffer for reading
    ae95e6dc
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • stowing circular buffer work
    ae9b2060
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Parsing read buffer is now probably fixed
    962dec5e
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Change from checking fd==-1 to properly through the destructor
    7e87fd91
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Fix memory leak on malloc errors
    9b6e0d3b
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Fix some memory keeping bug and connection handling ...
    84e76c32
    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.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Some more compliant connect error handling
    52cdff03
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Start of retained messages ...
    70896f68
    Also materializes some concepts about MqttPacket.
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Will stuff in connect
    e3ad153c
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Error handling and a bit of cleanup
    21bf9bf5
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Yield write time when locked
    3e7072dd
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Rudimentary lock based cross-thread publish
    54f45b27
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Drop or throttle when buffers are full
    e29e0f6d
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • Read buf fixes
    ffdf1c91
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »
  • IO stuff
    73ef26ae
    Wiebe Cazemier authored
    2021-03-20 19:02:25 +0100  
    Browse File »

10 Dec, 2020
2 commits
  • quick hack to get all threads to work
    a6333881
    Wiebe Cazemier authored
    2020-12-10 22:18:21 +0100  
    Browse File »
  • Publishing within the same thread works ...
    40f8e5e5
    Roughly...
    Wiebe Cazemier authored
    2020-12-10 21:57:42 +0100  
    Browse File »