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
This commit is contained in:
Korina Šimičević
2024-01-04 15:31:06 +01:00
parent 6f5c179929
commit 123e70d8fe
13 changed files with 126 additions and 60 deletions

View File

@@ -51,19 +51,11 @@ public:
}
template <typename Prop>
decltype(auto) connack_prop(Prop p) {
return std::as_const(_test_props[p]);
const auto& connack_property(Prop p) const {
return _test_props[p];
}
template <typename Prop0, typename ...Props>
decltype(auto) connack_props(Prop0 p0, Props ...props) {
return std::make_tuple(
std::as_const(_test_props[p0]),
std::as_const(_test_props[props])...
);
}
const auto& connack_props() {
const auto& connack_properties() {
return _test_props;
}