Korina Šimičević
a1249b433d
Reconnect on every Reason Code > 0x80 received in the CONNACK packet
...
Summary: related to T13767
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D28217
2024-02-29 14:18:33 +01:00
Bruno Iljazovic
701698e5ec
resend terminal disconnect
...
Summary:
- if we are in the process of connecting when user invokes async_disconnect we should send a disconnect packet after connect completes
- move integration disconnect tests to integration folder
Reviewers: ivica
Reviewed By: ivica
Subscribers: korina
Differential Revision: https://repo.mireo.local/D28119
2024-02-23 14:40:00 +01:00
Korina Šimičević
2f055e8894
Remove connection error codes
...
Summary: related to T13767
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D28117
2024-02-23 14:01:28 +01:00
Korina Šimičević
634a4bdfa9
async_disconnect will close the connection regardless of the current connection state
...
Summary: related to T13761
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D28057
2024-02-22 12:14:24 +01:00
Bruno Iljazovic
22d3b644c5
add subscription_identifers unit test
...
Reviewers: korina
Reviewed By: korina
Differential Revision: https://repo.mireo.local/D28003
2024-02-19 14:19:24 +01:00
Korina Šimičević
7cbd7725fc
Wait exponentially longer when all hosts have been exhausted during reconnect
...
Summary: related to T13746
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27995
2024-02-19 13:26:12 +01:00
Bruno Iljazovic
1acdd99f28
Support multiple subscription identifiers in received messages.
...
Summary:
- refactor property encoding
- change user property type to be std::pair<std::string, std::string>
Reviewers: ivica
Reviewed By: ivica
Subscribers: korina
Differential Revision: https://repo.mireo.local/D27867
2024-02-16 10:59:07 +01:00
Korina Šimičević
b40ddb3ced
Separate tests to compile and run all configuration-related client functions
...
Summary: related to T12015
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27945
2024-02-16 07:38:58 +01:00
Bruno Iljazovic
cbe477a701
Correct two/four byte integer properties' types.
...
Reviewers: ivica
Reviewed By: ivica
Subscribers: korina
Differential Revision: https://repo.mireo.local/D27901
2024-02-14 15:20:45 +01:00
Korina Šimičević
cfa2b76176
Remove unused cnf parameter in client_service
...
Summary: related to T13709
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27895
2024-02-14 14:40:41 +01:00
Korina Šimičević
d1d50d029d
Add connection error codes
...
Summary:
related to T13651
- separate code related to reason codes into their own header
- introduce new connection error codes that will be return when a non-recoverable error occurs in connect_op
- add appropriate coverage tests
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27808
2024-02-08 12:27:22 +01:00
Korina Šimičević
0de02e3c53
Add async mutex unit tests
...
Summary:
related to T12015
- relax coroutine tests
- add async mutex unit tests
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27719
2024-02-06 07:44:05 +01:00
Korina Šimičević
5c7f0bc29d
Add missing malformed tests for publish packets
...
Summary:
related to T12015
- all malformed cases should now be fully covered!
- additionally, added a receive channel overflow test
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27709
2024-02-05 07:54:08 +01:00
Korina Šimičević
677e625d1a
Simplify usage of subscribe options enums
...
Summary: related to T13606
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27679
2024-02-02 10:21:03 +01:00
Korina Šimičević
e143fcce63
Fix initialization
...
Summary: related to T12015
Reviewers: iljazovic
Reviewed By: iljazovic
Subscribers: miljen
Differential Revision: https://repo.mireo.local/D27664
2024-02-01 11:00:05 +01:00
Korina Šimičević
33c8eea890
Add function to set keep alive/ping interval
...
Summary:
related to T13566
- mqtt_client has a new keep_alive(seconds) function
- keep_alive(0) disables ping
- if keep_alive() is not called, the client assumes keep_alive=10
- the client respects server_keep_alive if sent by the broker
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27557
2024-02-01 08:29:22 +01:00
Korina Šimičević
d6c4884d53
(Un)subscribe validates the number of topics and reason codes
...
Test Plan:
related to T12015
- (un)subscribe reason codes will always contain as many reason codes as there are topic filters
- if, by some odd chance, the client receives the wrong number of rcs or some are invalid, it will treat it as malformed
- both subscribe_op and unsubscribe_op should be 100% covered by tests now
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27592
2024-01-30 15:25:58 +01:00
Korina Šimičević
61f17f6e0f
Fix user property encoding
...
Summary: related to T11798
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27532
2024-01-24 13:03:38 +01:00
Korina Šimičević
85ef3e70e4
Simplify and shorten unit test code - part 2
...
Summary: related to T12015
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27502
2024-01-23 08:50:26 +01:00
Korina Šimičević
9b92f7fca2
Simplify and shorten unit test code - part 1
...
Summary: related to T12015
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27488
2024-01-23 07:54:38 +01:00
Korina Šimičević
fa014fc337
Add op cancellation tests
...
Summary: related to T12015
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27459
2024-01-19 14:47:14 +01:00
Korina Šimičević
d7d0b4c239
Add re authentication tests
...
Summary: related to T12015
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27436
2024-01-19 11:30:41 +01:00
Korina Šimičević
1485d5ec8b
Add enhanced auth unit tests
...
Summary: related to T12015
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27425
2024-01-18 11:52:07 +01:00
Korina Šimičević
6267c5f706
Connect_op basic unit tests
...
Summary:
related to T12015
- added basic unit tests (without auth for a smaller diff)
- further simplified tests in publish_receive.cpp
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27417
2024-01-18 08:14:45 +01:00
Korina Šimičević
70f78a9f60
Add new tests cases & test housekeeping
...
Summary:
related to T12015
- error.hpp covered
- assemble_op.hpp fully covered
- malformed_pubrel test is now functional
- attempt at using fixtures in malformed_packet.cpp test suite to
lower the amount of copy-paste code lines
- test coverage ~89%
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27395
2024-01-17 07:59:14 +01:00
Bruno Iljazovic
4f87b27861
async_run
...
Reviewers: ivica
Reviewed By: ivica
Subscribers: korina
Differential Revision: https://repo.mireo.local/D27342
2024-01-16 13:18:21 +01:00
Korina Šimičević
2f6751d162
Separate tests into unit & integration
...
Summary:
- Separate tests into unit & integration
- Update paths in workflows
- Cut test execution time
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27374
2024-01-16 11:45:23 +01:00
Korina Šimičević
e3eb408c98
Complete serialization, publish_rec_op & unsubscribe tests
...
Summary: related to T12015
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27356
2024-01-15 12:32:40 +01:00
Korina Šimičević
3629c19ce9
Disconnect_op tests, malformed & resending tests in publish and subscribe op
...
Summary: related to T12015
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27323
2024-01-12 09:57:43 +01:00
Korina Šimičević
2f76ce9593
Run test coverage
...
Summary:
related to T13434
- boost is installed as header only (binaries do not work with the coroutine code)
- added test coverage, final results: https://app.codecov.io/github/ksimicevic/async-mqtt5/commit/d9ef85a89b9361f916c747c928fa9303a2a0df2f/tree
- finally can compile coroutine code
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27287
2024-01-10 12:39:11 +01:00
Bruno Iljazovic
d78fdd3208
use associated executors for intermediate handlers
...
Summary: * per-operation cancellation changed: total/partial signals only prevent further resending, terminal signal cancels the whole client
Reviewers: ivica
Reviewed By: ivica
Subscribers: korina
Differential Revision: https://repo.mireo.local/D27246
2024-01-09 16:35:16 +01:00
Korina Šimičević
9ada50dd66
Setup CI posix pipeline
...
Summary:
related to T13434
results: https://github.com/ksimicevic/async-mqtt5/actions/runs/7423093001/job/20199741951
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27242
2024-01-08 09:30:07 +01:00
Korina Šimičević
123e70d8fe
Improved CONNECT & CONNACK property client functions
...
Summary: related to T13427
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27218
2024-01-05 08:03:38 +01:00
Korina Šimičević
6f5c179929
CMakeLists.txt modifications
2024-01-04 13:20:18 +01:00
friendlyanon
6abe93fcc9
Add CMake build and client support
2024-01-04 13:20:18 +01:00
Korina Šimičević
794c72cb44
Handle all MSVC warnings
...
Summary: related to T13409
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D27152
2024-01-02 11:50:15 +01:00
Korina Šimičević
97d8a4ea86
Validate control packet size
...
Summary: resolves T13332
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Maniphest Tasks: T13332
Differential Revision: https://repo.mireo.local/D27000
2023-12-22 10:00:53 +01:00
Bruno Iljazovic
79d3f7606d
[tests] validate client to test broker packets
...
Reviewers: ivica
Reviewed By: ivica
Subscribers: korina
Differential Revision: https://repo.mireo.local/D27018
2023-12-18 13:30:10 +01:00
Korina Šimičević
9af32a942b
Properties & string validation
...
Summary: related to T13318
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D26975
2023-12-14 15:29:40 +01:00
Korina Šimičević
b275411ada
Validate subscribe requests
...
Summary: resolves T13305
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Maniphest Tasks: T13305
Differential Revision: https://repo.mireo.local/D26954
2023-12-14 08:41:04 +01:00
Korina Šimičević
26454e75eb
Topic filter & topic name validation
...
Summary: related to T13170
Reviewers: ivica
Reviewed By: ivica
Subscribers: iljazovic, miljen
Differential Revision: https://repo.mireo.local/D26899
2023-12-13 12:03:52 +01:00
Korina Šimičević
0d778c6b59
Update examples, tests & docs
...
Summary: related to T13242
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D26889
2023-12-07 15:47:02 +01:00
Korina Šimičević
e849166599
Downgrade C++ standard requirement to C++17
...
Summary: related to T13242
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D26860
2023-12-07 09:50:41 +01:00
Korina Šimičević
3640a4fb2a
Remove using enum constructs
...
Summary: related to T13242
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D26841
2023-12-06 10:07:41 +01:00
Korina Šimičević
35b190ef67
Declaration changes meaning fix
...
Summary: resolves T13222
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Maniphest Tasks: T13222
Differential Revision: https://repo.mireo.local/D26828
2023-12-05 12:28:47 +01:00
Korina Šimičević
64a003e2ed
Do not store ec=session_expired if the client never subscribed
...
Summary: related to T13152
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Differential Revision: https://repo.mireo.local/D26803
2023-12-01 15:49:02 +01:00
Bruno Iljazovic
dfd4b41a4e
support large publish packets
...
Reviewers: ivica
Reviewed By: ivica
Subscribers: korina
Differential Revision: https://repo.mireo.local/D26763
2023-11-30 10:43:52 +01:00
Ivica Siladic
8c1c4fab9f
Align utf8 manipulation code style.
2023-11-30 08:36:05 +01:00
Korina Šimičević
c18e5fc4f4
topic validation in subscribe, unsubscribe & publish
...
Summary: resolves T13170
Reviewers: ivica
Reviewed By: ivica
Subscribers: miljen, iljazovic
Maniphest Tasks: T13170
Differential Revision: https://repo.mireo.local/D26728
2023-11-29 11:52:16 +01:00
Bruno Iljazovic
f6248eea40
correct tracking executor
...
Summary: - don't resend per-operation cancelled publish and (un)subscribe operations
Reviewers: ivica
Reviewed By: ivica
Subscribers: korina
Differential Revision: https://repo.mireo.local/D26724
2023-11-28 11:04:14 +01:00