diff --git a/README.md b/README.md index 9dcc46f..3929bbb 100644 --- a/README.md +++ b/README.md @@ -51,8 +51,6 @@ You can compile the example below with the following command line on Linux: Usage and API --------- -Detailed documentation is available [here](https://spacetime.mireo.com/async-mqtt5/). - The following example illustrates a simple scenario of configuring a Client and publishing a "Hello World!" Application Message with `QoS` 0. diff --git a/doc/qbk/00_main.qbk b/doc/qbk/00_main.qbk index cabe562..94de3cc 100644 --- a/doc/qbk/00_main.qbk +++ b/doc/qbk/00_main.qbk @@ -1,8 +1,8 @@ [library Async.MQTT5: a C++17 MQTT client [quickbook 1.7] - [copyright 2023 Mireo] + [copyright 2023-2024 Mireo] [id async_mqtt5] - [purpose C++20 MQTT client] + [purpose C++17 MQTT client] [license Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at diff --git a/doc/qbk/02_examples.qbk b/doc/qbk/02_examples.qbk index 2e1db8f..59cacad 100644 --- a/doc/qbk/02_examples.qbk +++ b/doc/qbk/02_examples.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:examples Examples] The main class in __Self__ is __Client__, and the upcoming examples will briefly explain how to use it. diff --git a/doc/qbk/examples/Completion_tokens.qbk b/doc/qbk/examples/Completion_tokens.qbk index 5c711cd..947d950 100644 --- a/doc/qbk/examples/Completion_tokens.qbk +++ b/doc/qbk/examples/Completion_tokens.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:completion_tokens Completion tokens] The __Client__ is built upon __Asio__ and thus follows the same principles. This section illustrates the usage of __Client__ async diff --git a/doc/qbk/examples/Network_connection.qbk b/doc/qbk/examples/Network_connection.qbk index 6d0f408..0090b5c 100644 --- a/doc/qbk/examples/Network_connection.qbk +++ b/doc/qbk/examples/Network_connection.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:network_connection Establishing a network connection with different protocols ] The __MQTT__ protocol requires the underlying transport protocol that ensures orderly, lossless transmission of byte streams between the Client and Server in both directions. diff --git a/doc/qbk/examples/Tutorial.qbk b/doc/qbk/examples/Tutorial.qbk index e898ecc..9f81f0b 100644 --- a/doc/qbk/examples/Tutorial.qbk +++ b/doc/qbk/examples/Tutorial.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:publisher The publisher] This example will show how to use __Client__ as a publisher. The __Client__ will use TCP to connect to the Broker, and __USE_AWAITABLE__ as the completion token. diff --git a/doc/qbk/reference/Error_handling.qbk b/doc/qbk/reference/Error_handling.qbk index 4663d58..295e035 100644 --- a/doc/qbk/reference/Error_handling.qbk +++ b/doc/qbk/reference/Error_handling.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:Error_handling Error handling] The table below provides a reference of all __ERROR_CODE__ instances that asynchronous operations diff --git a/doc/qbk/reference/concepts/ExecutionContext.qbk b/doc/qbk/reference/concepts/ExecutionContext.qbk index 549fcff..d34ee19 100644 --- a/doc/qbk/reference/concepts/ExecutionContext.qbk +++ b/doc/qbk/reference/concepts/ExecutionContext.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:ExecutionContext ExecutionContext concept] `ExecutionContext` represents a place where function objects will be executed. diff --git a/doc/qbk/reference/concepts/StreamType.qbk b/doc/qbk/reference/concepts/StreamType.qbk index c03da36..7122c62 100644 --- a/doc/qbk/reference/concepts/StreamType.qbk +++ b/doc/qbk/reference/concepts/StreamType.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:StreamType StreamType concept] `StreamType` represents the transport protocol type used to transfer stream of bytes. diff --git a/doc/qbk/reference/concepts/TlsContext.qbk b/doc/qbk/reference/concepts/TlsContext.qbk index cc816d0..db8de76 100644 --- a/doc/qbk/reference/concepts/TlsContext.qbk +++ b/doc/qbk/reference/concepts/TlsContext.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:TlsContext TlsContext concept] `TlsContext` represents an object that defines user's configuration diff --git a/doc/qbk/reference/concepts/is_authenticator.qbk b/doc/qbk/reference/concepts/is_authenticator.qbk index 6b91e42..7df7fcc 100644 --- a/doc/qbk/reference/concepts/is_authenticator.qbk +++ b/doc/qbk/reference/concepts/is_authenticator.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:is_authenticator is_authenticator concept] A type `Authenticator` satisfies `is_authenticator` concept if it satisifes the requirements listed below. diff --git a/doc/qbk/reference/properties/auth_props.qbk b/doc/qbk/reference/properties/auth_props.qbk index f7129b1..72cc8c1 100644 --- a/doc/qbk/reference/properties/auth_props.qbk +++ b/doc/qbk/reference/properties/auth_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:auth_props AUTH properties] The last field in the Variable header of __AUTH__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -37,7 +30,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/connack_props.qbk b/doc/qbk/reference/properties/connack_props.qbk index bca62c7..97d8567 100644 --- a/doc/qbk/reference/properties/connack_props.qbk +++ b/doc/qbk/reference/properties/connack_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:connack_props CONNACK properties] The last field in the Variable header of __CONNACK__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -53,7 +46,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/connect_props.qbk b/doc/qbk/reference/properties/connect_props.qbk index 3aa6bd6..0e98334 100644 --- a/doc/qbk/reference/properties/connect_props.qbk +++ b/doc/qbk/reference/properties/connect_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:connect_props CONNECT properties] The last field in the Variable header of __CONNECT__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -44,7 +37,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/disconnect_props.qbk b/doc/qbk/reference/properties/disconnect_props.qbk index 6b361cd..9c7564f 100644 --- a/doc/qbk/reference/properties/disconnect_props.qbk +++ b/doc/qbk/reference/properties/disconnect_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:disconnect_props DISCONNECT properties] The last field in the Variable header of __DISCONNECT__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -36,7 +29,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/puback_props.qbk b/doc/qbk/reference/properties/puback_props.qbk index 711354c..869c44a 100644 --- a/doc/qbk/reference/properties/puback_props.qbk +++ b/doc/qbk/reference/properties/puback_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:puback_props PUBACK properties] The last field in the Variable header of __PUBACK__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -34,7 +27,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/pubcomp_props.qbk b/doc/qbk/reference/properties/pubcomp_props.qbk index d53b37c..d8fc046 100644 --- a/doc/qbk/reference/properties/pubcomp_props.qbk +++ b/doc/qbk/reference/properties/pubcomp_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:pubcomp_props PUBCOMP properties] The last field in the Variable header of __PUBCOMP__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -34,7 +27,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/publish_props.qbk b/doc/qbk/reference/properties/publish_props.qbk index 44fba4e..74f9fa2 100644 --- a/doc/qbk/reference/properties/publish_props.qbk +++ b/doc/qbk/reference/properties/publish_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:publish_props PUBLISH properties] The last field in the Variable header of __PUBLISH__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -42,7 +35,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/pubrec_props.qbk b/doc/qbk/reference/properties/pubrec_props.qbk index 6bd666b..60b3881 100644 --- a/doc/qbk/reference/properties/pubrec_props.qbk +++ b/doc/qbk/reference/properties/pubrec_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:pubrec_props PUBREC properties] The last field in the Variable header of __PUBREC__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -34,7 +27,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/pubrel_props.qbk b/doc/qbk/reference/properties/pubrel_props.qbk index 685c2c9..668e370 100644 --- a/doc/qbk/reference/properties/pubrel_props.qbk +++ b/doc/qbk/reference/properties/pubrel_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:pubrel_props PUBREL properties] The last field in the Variable header of __PUBREL__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -33,7 +26,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/suback_props.qbk b/doc/qbk/reference/properties/suback_props.qbk index f151f72..3cf785a 100644 --- a/doc/qbk/reference/properties/suback_props.qbk +++ b/doc/qbk/reference/properties/suback_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:suback_props SUBACK properties] The last field in the Variable header of __SUBACK__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -34,7 +27,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/subscribe_props.qbk b/doc/qbk/reference/properties/subscribe_props.qbk index 710ad6a..cf17a3b 100644 --- a/doc/qbk/reference/properties/subscribe_props.qbk +++ b/doc/qbk/reference/properties/subscribe_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:subscribe_props SUBSCRIBE properties] The last field in the Variable header of __SUBSCRIBE__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -35,7 +28,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/unsuback_props.qbk b/doc/qbk/reference/properties/unsuback_props.qbk index 83e66aa..eced5d3 100644 --- a/doc/qbk/reference/properties/unsuback_props.qbk +++ b/doc/qbk/reference/properties/unsuback_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:unsuback_props UNSUBACK properties] The last field in the Variable header of __UNSUBACK__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -34,7 +27,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/unsubscribe_props.qbk b/doc/qbk/reference/properties/unsubscribe_props.qbk index 3b218ae..3e7d9c1 100644 --- a/doc/qbk/reference/properties/unsubscribe_props.qbk +++ b/doc/qbk/reference/properties/unsubscribe_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:unsubscribe_props UNSUBSCRIBE properties] The last field in the Variable header of __UNSUBSCRIBE__ packet is a set of Properties. A set contains a Property Length followed by the Properties. @@ -35,7 +28,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/properties/will_props.qbk b/doc/qbk/reference/properties/will_props.qbk index d8d9800..de1102e 100644 --- a/doc/qbk/reference/properties/will_props.qbk +++ b/doc/qbk/reference/properties/will_props.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:will_props Will properties] The Will Properties consist of the properties that determine when to publish the [reflink2 will Will] Message and the Application Message properties to be sent with the [reflink2 will Will] Message. @@ -41,7 +34,7 @@ The following example shows how to set a Property value: The following example shows how to retrieve a Property value: -[note When retrieving a property value, the subscript operator will consistently return a `std::optional` of the value type for all properties, +[note When retrieving a property value, the subscript operator will return a `std::optional` of the value type for all properties, except for `async_mqtt5::prop::user_property`, where it will return an instance of its value type, `std::vector`.] [!c++] diff --git a/doc/qbk/reference/quickref.xml b/doc/qbk/reference/quickref.xml index 5899911..1423108 100644 --- a/doc/qbk/reference/quickref.xml +++ b/doc/qbk/reference/quickref.xml @@ -1,13 +1,6 @@ - - diff --git a/doc/qbk/reference/reason_codes/Reason_codes.qbk b/doc/qbk/reference/reason_codes/Reason_codes.qbk index 0d6b7d4..2eba60a 100644 --- a/doc/qbk/reference/reason_codes/Reason_codes.qbk +++ b/doc/qbk/reference/reason_codes/Reason_codes.qbk @@ -1,10 +1,3 @@ -[/ - Copyright (c) 2023 Mireo - - Distributed under the Boost Software License, Version 1.0. (See accompanying - file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -] - [section:Reason_codes Reason codes] This section lists all possible __REASON_CODE__ instances representing diff --git a/doc/qbk/reference/reason_codes/rcref.xml b/doc/qbk/reference/reason_codes/rcref.xml index 7ecb6e2..4ddd44d 100644 --- a/doc/qbk/reference/reason_codes/rcref.xml +++ b/doc/qbk/reference/reason_codes/rcref.xml @@ -1,13 +1,6 @@ - - diff --git a/doc/reference.xsl b/doc/reference.xsl index dad8434..90a6375 100644 --- a/doc/reference.xsl +++ b/doc/reference.xsl @@ -1,13 +1,6 @@ - - @@ -26,12 +19,7 @@ Anything in a "detail" namespace is skipped. --> -[/ - /Copyright (c) 2023 Mireo - / - /Distributed under the Boost Software License, Version 1.0. (See accompanying - /file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -/] + [section:ref Reference] [xinclude quickref.xml] diff --git a/example/publisher.cpp b/example/publisher.cpp index 015c223..a894e45 100644 --- a/example/publisher.cpp +++ b/example/publisher.cpp @@ -15,10 +15,10 @@ namespace asio = boost::asio; asio::awaitable client_publisher(asio::io_context& ioc) { - // Initialise the ``__Client__``, establish connection to the Broker over TCP. + // Initialise the Client, establish connection to the Broker over TCP. async_mqtt5::mqtt_client client(ioc, ""); - // Configure the ``__Client__``. + // Configure the Client. // It is mandatory to call brokers() and async_run() to configure the Brokers to connect to and start the Client. client.brokers("mqtt.broker", 1883) // Broker that we want to connect to. 1883 is the default TCP port. .async_run(asio::detached); // Start the client. @@ -54,6 +54,6 @@ int main() { ioc.run(); } -//] - #endif + +//] diff --git a/example/receiver.cpp b/example/receiver.cpp index 123da86..e340bfa 100644 --- a/example/receiver.cpp +++ b/example/receiver.cpp @@ -15,10 +15,10 @@ namespace asio = boost::asio; asio::awaitable client_receiver(asio::io_context& ioc) { - // Initialise the ``__Client__``, establish connection to the Broker over TCP. + // Initialise the Client, establish connection to the Broker over TCP. async_mqtt5::mqtt_client client(ioc, ""); - // Configure the``__Client__``. + // Configure the Client. // It is mandatory to call brokers() and async_run() to configure the Brokers to connect to and start the Client. client.brokers("mqtt.broker", 1883) // Broker that we want to connect to. 1883 is the default TCP port. .async_run(asio::detached); // Start the client. @@ -44,7 +44,7 @@ asio::awaitable client_receiver(asio::io_context& ioc) { // Before attempting to receive an Application Message from the Topic we just subscribed to, // it is advisable to verify that the subscription succeeded. // It is not recommended to call mqtt_client::async_receive if you do not have any - // Subscription established as the corresponding handler will never be invoked. + // subscription established as the corresponding handler will never be invoked. if (!sub_codes[0]) auto [topic, payload, publish_props] = co_await client.async_receive(asio::use_awaitable); // Receive more messages... @@ -79,6 +79,6 @@ int main() { ioc.run(); } -//] - #endif + +//]