mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-07-30 04:27:34 +02:00
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
This commit is contained in:
@ -180,9 +180,9 @@ void subscribe_and_receive_openssl_tls(int num_receive) {
|
||||
topics.push_back(subscribe_topic {
|
||||
"test/mqtt-test", {
|
||||
qos_e::exactly_once,
|
||||
subscribe_options::no_local_e::no,
|
||||
subscribe_options::retain_as_published_e::retain,
|
||||
subscribe_options::retain_handling_e::send
|
||||
no_local_e::no,
|
||||
retain_as_published_e::retain,
|
||||
retain_handling_e::send
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -28,9 +28,9 @@ asio::awaitable<void> client_receiver(asio::io_context& ioc) {
|
||||
"test/mqtt-test",
|
||||
async_mqtt5::subscribe_options {
|
||||
async_mqtt5::qos_e::exactly_once, // All messages will arrive at QoS 2.
|
||||
async_mqtt5::subscribe_options::no_local_e::no, // Forward message from Clients with same ID.
|
||||
async_mqtt5::subscribe_options::retain_as_published_e::retain, // Keep the original RETAIN flag.
|
||||
async_mqtt5::subscribe_options::retain_handling_e::send // Send retained messages when the subscription is established.
|
||||
async_mqtt5::no_local_e::no, // Forward message from Clients with same ID.
|
||||
async_mqtt5::retain_as_published_e::retain, // Keep the original RETAIN flag.
|
||||
async_mqtt5::retain_handling_e::send // Send retained messages when the subscription is established.
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -124,11 +124,11 @@ void subscribe_and_receive_websocket_tcp(int num_receive) {
|
||||
topics.push_back(subscribe_topic{
|
||||
"test/mqtt-test", {
|
||||
qos_e::exactly_once,
|
||||
subscribe_options::no_local_e::no,
|
||||
subscribe_options::retain_as_published_e::retain,
|
||||
subscribe_options::retain_handling_e::send
|
||||
no_local_e::no,
|
||||
retain_as_published_e::retain,
|
||||
retain_handling_e::send
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
c.async_subscribe(
|
||||
topics, subscribe_props{},
|
||||
|
@ -199,11 +199,11 @@ void subscribe_and_receive_websocket_tls(int num_receive) {
|
||||
topics.push_back(subscribe_topic{
|
||||
"test/mqtt-test", {
|
||||
qos_e::exactly_once,
|
||||
subscribe_options::no_local_e::no,
|
||||
subscribe_options::retain_as_published_e::retain,
|
||||
subscribe_options::retain_handling_e::send
|
||||
no_local_e::no,
|
||||
retain_as_published_e::retain,
|
||||
retain_handling_e::send
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
c.async_subscribe(
|
||||
topics, subscribe_props{},
|
||||
|
Reference in New Issue
Block a user