Skip to content

Commit 0b935bd

Browse files
committed
Documentation fixes
Summary: related to T13767 Reviewers: ivica Reviewed By: ivica Subscribers: iljazovic, miljen Differential Revision: https://repo.mireo.local/D31723
1 parent 1e57b3b commit 0b935bd

9 files changed

+27
-27
lines changed

doc/qbk/03_auto_reconnect.qbk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In situations where the connection is unexpectedly lost mid-protocol flow,
1919
the __Client__ complies with the MQTT protocol's specified message delivery retry mechanisms.
2020

2121
The following example will showcase how the __Client__ internally manages various scenarios, including successful transmission, offline queuing,
22-
and connection loss retransmissions, when executing a request to publish a message with QoS 1.
22+
and connection loss retransmissions when executing a request to publish a message with QoS 1.
2323
Note that the same principle applies to all other asynchronous functions within the __Client__
2424
(see /Completion condition/ under [refmem mqtt_client async_publish], [refmem mqtt_client async_subscribe], [refmem mqtt_client async_unsubscribe],
2525
and [refmem mqtt_client async_disconnect]).
@@ -75,7 +75,7 @@ such as when a device connected to the network loses its GSM connectivity.
7575
However, the connection may be closed (or never established) for other reasons,
7676
which are typically related to misconfiguration of broker IPs, ports, expired or incorrect TLS, or MQTT-related errors,
7777
such as trying to communicate with a Broker that does not support MQTT 5.
78-
In these cases, the __Client__ will still endlessly try to connect to Broker(s), but the connection will never succeed.
78+
In these cases, the __Client__ will still endlessly try to connect to the Broker(s), but the connection will never succeed.
7979

8080
The most challenging problem here is that users of the __Client__ do not get informed in any way that the connection cannot be established.
8181
So, if you make a typo in the Broker's IP, run the __Client__, and publish some message, the [refmem mqtt_client async_publish] callback will never be invoked,

doc/qbk/04_maintaining_a_stable_connection.qbk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,12 @@ which responds with __PINGRESP__ packet, affirming its operational status.
7777

7878
The __Client__ will dispatch a __PINGREQ__ at an interval equal to the negotiated `Keep Alive` seconds and expects
7979
to receive some data
80-
[footnote The __Client__ does not require to specifically receive __PINGRESP__ to its __PINGREQ__. Any data from the Broker will suffice to confirm its status.]
80+
[footnote The __Client__ is not required to specifically receive __PINGRESP__ to its __PINGREQ__. Any data from the Broker will suffice to confirm its status.]
8181
from the Broker within `1.5` times the negotiated `Keep Alive` seconds.
8282
If no data is received within this time, the __Client__ will assume a half-open state and initiate a reconnect procedure
8383
described in the [link async_mqtt5.auto_reconnect Built-in auto-reconnect and retry mechanism].
8484

85-
[important If the negotiated `Keep Alive` value is set to `0`, the timeout mechanism to detect half-open connection
85+
[important If the negotiated `Keep Alive` value is set to `0`, the timeout mechanism to detect a half-open connection
8686
is disabled. As a result, the __Client__ loses its capability to identify and adequately respond to half-open scenarios.]
8787

8888
[endsect] [/half_open_connections]

doc/qbk/05_optimising_communication.qbk

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
[nochunk]
99

1010
This chapter provides a detailed breakdown of how __Client__ optimises its communications with the Broker
11-
with multiflight mode for simultanious message handling and strategies for efficient bandwidth usage.
11+
with multiflight mode for simultaneous message handling and strategies for efficient bandwidth usage.
1212
These techniques are key to getting the most out of MQTT in scenarios demanding fast and
1313
dependable message delivery, all while meeting the protocol's quality of service requirements and network efficiency standards.
1414

@@ -19,7 +19,7 @@ This allows the initiation of multiple asynchronous requests simultaneously, wit
1919
With this feature, you can repeatedly call [refmem mqtt_client async_publish] or any similar `async_xxx` function
2020
without waiting for the handler invocation of the previous `async_xxx` calls.
2121

22-
This feature is particulary helpful when using __Client__ with callbacks,
22+
This feature is particularly helpful when using __Client__ with callbacks,
2323
as it allows you to quickly dispatch multiple requests one after the other,
2424
instead of nesting them in callbacks.
2525

@@ -29,7 +29,7 @@ sending a __PUBLISH__ packet, receiving a __PUBREC__ acknowledgement from the Br
2929
transmitting a __PUBREL__ packet, and finally receiving a __PUBCOMP__ packet, confirming successful message delivery.
3030

3131
Despite the complexity of initiating several such message exchange sequences consecutively,
32-
the __Client__ will manage all intermediate packet exchange between the __Client__ and the Broker correctly and complete the message delivery.
32+
the __Client__ will manage all intermediate packet exchanges between the __Client__ and the Broker correctly and complete the message delivery.
3333

3434
It is important to note that there is no guarantee that the final handlers will be invoked
3535
in the same order as the corresponding `async_xxx` calls were initiated.

doc/qbk/06_disconnecting_the_client.qbk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Invoking [refmem mqtt_client cancel] results in the __Client__ closing the conne
1515
asynchronous operations.
1616
On the other hand, [refmem mqtt_client async_disconnect] will first attempt to send a __DISCONNECT__ packet
1717
[footnote The __Client__ will attempt to send the __DISCONNECT__ packet for `5 seconds`. Regardless of the outcome, the connection will be closed.]
18-
to the Broker in order to notify it about the reason for disconnection,
18+
to the Broker to notify it about the reason for disconnection,
1919
then close the connection and cancel all outstanding asynchronous operations (equal effect as [refmem mqtt_client cancel]).
2020

2121
[important Regardless of the method used to stop the __Client__, it is recommended to ensure that all the previous asynchronous operations are
@@ -71,7 +71,7 @@ packets in the queue. However, __DISCONNECT__ packets are prioritised and sent e
7171
Therefore, the connection will terminate immediately.
7272

7373
If the __Client__ cannot establish a connection to the Broker,
74-
it will be stopped after `5 seconds`, which is the amount of time the it will spend
74+
it will be stopped after `5 seconds`, which is the amount of time it will spend
7575
trying to send the __DISCONNECT__ packet to the Broker before quitting.
7676
This timeout mechanism ensures that the __Client__ does not indefinitely wait to disconnect,
7777
preserving resources and maintaining efficient operation.

doc/qbk/15_examples.qbk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The following list contains all the examples that showcase how to use the __Clie
4242
[[link async_mqtt5.timeout_with_parallel_group timeout_with_parallel_group.cpp]]
4343
[
4444
Shows how to use the __Client__ with its support for per-operation cancellation to perform operations under a time constraint
45-
using parallel group.
45+
using a parallel group.
4646
]
4747
]
4848
[

include/async_mqtt5/impl/replies.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class replies {
102102

103103
public:
104104
template <typename Executor>
105-
explicit replies(Executor ex) : _ex(ex) {}
105+
explicit replies(Executor ex) : _ex(std::move(ex)) {}
106106

107107
replies(replies&&) = default;
108108
replies(const replies&) = delete;

include/async_mqtt5/mqtt_client.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,9 @@ class mqtt_client {
189189
*
190190
* \par Completion condition
191191
* The asynchronous operation will complete with
192-
* `boost::asio::error::operation_aborted` when client is cancelled by calling
192+
* `boost::asio::error::operation_aborted` when the client is cancelled by calling
193193
* \ref mqtt_client::async_disconnect, \ref mqtt_client::cancel, destruction or
194-
* if non-recoverable error happens during connection attempt (e.g. access denied).
194+
* if a non-recoverable error happens during a connection attempt (e.g. access denied).
195195
*
196196
* \par Error codes
197197
* The list of all possible error codes that this operation can finish with:\n
@@ -795,7 +795,7 @@ class mqtt_client {
795795
*
796796
* \details The Client will receive and complete deliveries for all the
797797
* \__PUBLISH\__ packets received from the Broker throughout its lifetime.
798-
* The Client will store them internally in order they were delivered.
798+
* The Client will store them internally in the order they were delivered.
799799
* Calling this function will attempt to receive an Application Message
800800
* from internal storage.
801801
*
@@ -859,7 +859,7 @@ class mqtt_client {
859859
* See \ref mqtt_client::cancel.
860860
*
861861
* \param reason_code Reason Code to notify
862-
* the Broker of the reason for disconnection.
862+
* the Broker of the reason for the disconnection.
863863
* \param props An instance of \__DISCONNECT_PROPS\__.
864864
* \param token Completion token that will be used to produce a
865865
* completion handler. The handler will be invoked when the operation completes.
@@ -884,7 +884,7 @@ class mqtt_client {
884884
* The list of all possible error codes that this operation can finish with:\n
885885
* - `boost::system::errc::errc_t::success`\n
886886
* - `boost::asio::error::operation_aborted`[footnote
887-
This error code can appear if the Client failed to send the \__DISCONNECT\__ packet to the Server.
887+
This error code can appear if the Client fails to send the \__DISCONNECT\__ packet to the Server.
888888
Regardless, the connection to the Server is terminated, and the Client is cancelled.
889889
]\n
890890
* - \link async_mqtt5::client::error::malformed_packet \endlink
@@ -948,7 +948,7 @@ class mqtt_client {
948948
* The list of all possible error codes that this operation can finish with:\n
949949
* - `boost::system::errc::errc_t::success`\n
950950
* - `boost::asio::error::operation_aborted`[footnote
951-
This error code can appear if the Client failed to send the \__DISCONNECT\__ packet to the Server.
951+
This error code can appear if the Client fails to send the \__DISCONNECT\__ packet to the Server.
952952
Regardless, the connection to the Server is terminated, and the Client is cancelled.
953953
]\n
954954
* - \link async_mqtt5::client::error::malformed_packet \endlink

include/async_mqtt5/reason_codes.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class reason_code {
6161
/**
6262
* \brief Indication if the object holds a Reason Code indicating an error.
6363
*
64-
* \details Any Reason Code holding a value equal or greater than 0x80.
64+
* \details Any Reason Code holding a value equal to or greater than 0x80.
6565
*/
6666
explicit operator bool() const noexcept {
6767
return _code >= 0x80;
@@ -118,7 +118,7 @@ class reason_code {
118118
return "Initiate a re-authentication";
119119
case 0x80:
120120
return "The Server does not wish to reveal the reason for the"
121-
"failure, or none of the other Reason Codes apply";
121+
"failure or none of the other Reason Codes apply";
122122
case 0x81:
123123
return "Data within the packet could not be correctly parsed";
124124
case 0x82:
@@ -159,7 +159,7 @@ class reason_code {
159159
case 0x92:
160160
return "The Packet Identifier is not known";
161161
case 0x93:
162-
return "The Client or Server has received more than Receive "
162+
return "The Client or Server has received more than the Receive "
163163
"Maximum publication for which it has not sent PUBACK or PUBCOMP";
164164
case 0x94:
165165
return "The Client or Server received a PUBLISH packet containing "
@@ -239,7 +239,7 @@ constexpr reason_code continue_authentication { 0x18 };
239239
constexpr reason_code reauthenticate { 0x19 };
240240

241241
/** The Server does not wish to reveal the reason for the
242-
failure, or none of the other Reason Codes apply. */
242+
failure or none of the other Reason Codes apply. */
243243
constexpr reason_code unspecified_error { 0x80 };
244244

245245
/** Data within the packet could not be correctly parsed. */
@@ -298,7 +298,7 @@ constexpr reason_code packet_identifier_in_use { 0x91 };
298298
/** The Packet Identifier is not known. */
299299
constexpr reason_code packet_identifier_not_found { 0x92 };
300300

301-
/** The Client or Server has received more than Receive
301+
/** The Client or Server has received more than the Receive
302302
Maximum publication for which it has not sent PUBACK or PUBCOMP. */
303303
constexpr reason_code receive_maximum_exceeded { 0x93 };
304304

include/async_mqtt5/types.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717

1818
namespace async_mqtt5 {
1919

20-
/** An alias for `boost::system::error_code`; */
20+
/** An alias for `boost::system::error_code`. */
2121
using error_code = boost::system::error_code;
2222

2323
/**
2424
* \brief A data structure used to store information related to an authority
25-
* such as the host name, port, and path.
25+
* such as the hostname, port, and path.
2626
*/
2727
struct authority_path {
2828
std::string host, port, path;
@@ -72,16 +72,16 @@ enum class dup_e : std::uint8_t {
7272
* \brief Represents the stage of \__ENHANCED_AUTH\__ process.
7373
*/
7474
enum class auth_step_e {
75-
/** Client needs to send initial authentication data. */
75+
/** The Client needs to send initial authentication data. */
7676
client_initial,
7777

7878
/** Server responded with reason_codes.continue_authentication and possibly
79-
* authentication data, client needs to send further authentication data.
79+
* authentication data, the Client needs to send further authentication data.
8080
*/
8181
server_challenge,
8282

8383
/** Server responded with reason_codes.success and final
84-
* authentication data, which client validates.
84+
* authentication data, which the Client validates.
8585
*/
8686
server_final
8787
};

0 commit comments

Comments
 (0)