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
  • mqttpacket.cpp
03 Jul, 2022
6 commits
  • Separate QoS 2 parsing and handling
    483db298
    Wiebe Cazemier authored
    2022-07-03 14:38:18 +0200  
    Browse File »
  • Add parsePubAckData() ...
    5fb96542
    Will be used for the test client I have in mind.
    Wiebe Cazemier authored
    2022-07-03 14:38:18 +0200  
    Browse File »
  • Add parseSubAckData() ...
    546c8348
    Will be used for the test client I have in mind.
    Wiebe Cazemier authored
    2022-07-03 14:38:18 +0200  
    Browse File »
  • Separate DISCONNECT packet parsing and handling ...
    4bf112b6
    This is necessary for the test client I have in mind, so I can re-use
    this code in that new test client which has no MQTT behavior, but just
    returns packets (meaning I have to be able to parse them without
    initiating handling).
    Wiebe Cazemier authored
    2022-07-03 14:38:18 +0200  
    Browse File »
  • Separate CONNECT packet parsing and handling ...
    f262b796
    This is necessary for the test client I have in mind, so I can re-use
    this code in that new test client which has no MQTT behavior, but just
    returns packets (meaning I have to be able to parse them without
    initiating handling).
    Wiebe Cazemier authored
    2022-07-03 14:38:18 +0200  
    Browse File »
  • Allow repeated calls to parsePublishData() ...
    7775fe41
    And also to future parse... methods.
    
    This is necessary for the upcoming new test client.
    Wiebe Cazemier authored
    2022-07-03 14:38:18 +0200  
    Browse File »

30 Jun, 2022
1 commit
  • Don't access current thread through client ...
    70e77e6a
    This needed a separation: getting the current thread, and getting the
    thread of the client you're queueing a command for.
    
    This also resolves a circular reference between Client and ThreadData.
    Wiebe Cazemier authored
    2022-06-30 19:17:01 +0200  
    Browse File »

29 Jun, 2022
1 commit
  • Retrieve store from app instance ...
    6cdda452
    Instead of the thread data, which didn't make sense.
    Wiebe Cazemier authored
    2022-06-29 20:29:14 +0200  
    Browse File »

27 Jun, 2022
1 commit
  • Make atEnd() more robust
    b62854b1
    Wiebe Cazemier authored
    2022-06-27 12:54:30 +0200  
    Browse File »

21 Jun, 2022
1 commit
  • Add stats about connection count in $SYS ...
    e2ea3ea8
    This required adding a global stats object.
    
    It also contains a bit of refactor to make a type out of the derived
    counters.
    Wiebe Cazemier authored
    2022-06-21 07:44:24 +0200  
    Browse File »

18 May, 2022
1 commit
  • Use snapshot of maxIncomingTopicAliasValue from settings in client ...
    0e79ef5d
    This fixes clients being disconnected after reducing the max value and
    reloading the settings.
    Wiebe Cazemier authored
    2022-05-18 21:43:59 +0200  
    Browse File »

11 May, 2022
1 commit
  • Efficient client expiration checking ...
    ec40e5b1
    Check events are placed in a sorted map based on the last activity and
    keep-alive interval of the client.
    
    This makes it more accurate and reduces system load because it saves
    unnecessary checking.
    Wiebe Cazemier authored
    2022-05-11 19:31:56 +0200  
    Browse File »

01 May, 2022
28 commits
  • Check reserved bits in AUTH packet
    ae1d102f
    Wiebe Cazemier authored
    2022-05-01 18:21:51 +0200  
    Browse File »
  • Check reponse topic for invalid characters
    273fc26d
    Wiebe Cazemier authored
    2022-05-01 18:00:26 +0200  
    Browse File »
  • Flow control based on receive maximum ...
    7870dc8a
    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.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Remove assert that also has an exception ...
    ac53fea0
    The only thing it did was false trip the fuzzer.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Fix reading disconnect packets without reason code
    74a37991
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Reordered packet handling ifs
    4a702421
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Reverse if-guard to remove indentation ...
    6cd50fa2
    Diff with 'ignore whitespace' looks clean.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Implement extended authentication ...
    569b87ee
    This also contains some fixes/unifications for traditional
    authentication, error handling specifically.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Quiet warnings about not (yet) used variables
    13611a98
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Subscription identifiers in subscribe is protocol error ...
    0ffa0511
    The CONACK indicated that it's not supported, and the specs say to issue
    a disconnect when they're used after all.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Fix using uninitialized session expiry interval in disconnect
    e4b43df7
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Don't handle packets from clients we're closing ...
    f255c526
    This should prevent stale data from old clients from manipulating the
    session.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Support saving wills into the session db ...
    ebe7c845
    This required a special type WillPublish to make this easier and more
    logical.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Fix incorrect use of variable 'dup' ...
    58ec60b2
    It erroneously referred to the system function 'dup' now...
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Check all UTF8 strings in packet parsing for validity ...
    6473b379
    Also fix some bugs:
    
    - The password can be binary data.
    - The will topic is now also checked.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Convert to storing Publish object for retained message ...
    75657bf5
    This allows easier saving of MQTT5 properties, for which a new file
    version for retained messages is created. It uses the packet parsing logic.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Fix disconnect packet parsing ...
    3e13b436
    It went over boundry when there were no properties.
    
    Also changed will logic in disconnect: only clear it when it's a
    successful disconnect.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Fix various will things ...
    9c61bff7
    - 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.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Deal with username and/or password presence for various MQTT versions
    794a28bb
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Add MQTT5 disconnect handling
    d22ad6e1
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Defined a reason code for many errors ...
    193f509d
    I think it's very hard to distinguish between protocol error and
    malformed packet. It's kind of arbitrary...
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Add ability to send disconnect packets with code
    5f1d8259
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Load and store createdAt time of stored QoS packets ...
    ec518d7a
    Also fixes a bug in new interval calculation.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Store fixed header length in saved queued packet ...
    7be65e95
    And the TODOs are for the next thing: saving the createdAt date.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Have the MqttPacket constructor set client specific properties ...
    e69a2c35
    This prevents bugs because the calling context forgets it. A (small)
    downside is that I have to make the Publish argument non-const. But,
    that's exactly what it is then, so...
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Add some assert+doc about how packets are used ...
    163563e1
    Also fixed a length check bug.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Continue with idea to use parsed packets for loading from disk ...
    c652de5a
    Because clients can now also exist as dummy objects, I had to add some
    extra checks.
    
    Also split up handlePublish() and the new parsePublishData().
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »
  • Half idea of using the circular buffer to store packets ...
    6fed4d58
    I'm not sure how I'm continueing. I need a safe point.
    Wiebe Cazemier authored
    2022-05-01 17:32:10 +0200  
    Browse File »