mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-06-25 04:01:33 +02:00
Simplify document generation and replace Async.MQTT5 with Boost.MQTT5 in docs
Summary: related to T15996 - docs are now buildable with b2 (in a very simplified way) like mysql docs - change Async.MQTT5 -> Boost.MQTT5, async_mqtt5 namespace to boost::mqtt5 namespace - once changes are approved, Ill update all tabs to 4 spaces in .qbk files Reviewers: ivica Reviewed By: ivica Subscribers: iljazovic, miljen Differential Revision: https://repo.mireo.local/D33373
This commit is contained in:
158
doc/Jamfile
158
doc/Jamfile
@ -5,120 +5,68 @@
|
||||
# (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
#
|
||||
|
||||
project async_mqtt5/doc ;
|
||||
|
||||
import os ;
|
||||
local BOOST_ROOT = [ os.environ DevRoot ] ;
|
||||
|
||||
using boostbook
|
||||
: $(BOOST_ROOT)3rdParty/boost-doc/boostbook/docbook-xsl-1.79.1
|
||||
: $(BOOST_ROOT)3rdParty/boost-doc/boostbook/docbook-dtd-4.2
|
||||
: $(BOOST_ROOT)3rdParty/boost-doc/boostbook
|
||||
;
|
||||
|
||||
using xsltproc ;
|
||||
using doxygen ;
|
||||
|
||||
# we shall use os.platform to correctly map quickbook executable
|
||||
# echo [ os.platform ] ;
|
||||
|
||||
if [ os.name ] = MACOSX
|
||||
{
|
||||
using quickbook : $(BOOST_ROOT)build/macos-arm64-release/bin/quickbook ;
|
||||
}
|
||||
else if [ os.name ] = LINUX
|
||||
{
|
||||
using quickbook : $(BOOST_ROOT)build/linux-native-x64-release/bin/quickbook ;
|
||||
}
|
||||
project mqtt5/doc ;
|
||||
|
||||
import boostbook ;
|
||||
import os ;
|
||||
import path ;
|
||||
import-search /boost/docca ;
|
||||
import docca ;
|
||||
|
||||
make xml/index.xml
|
||||
:
|
||||
reference.dox
|
||||
local include-prefix = [ path.root $(__file__:D) [ path.pwd ] ] ;
|
||||
include-prefix = [ path.native $(include-prefix:D)/include ] ;
|
||||
|
||||
# additional dependencies
|
||||
../include/async_mqtt5/error.hpp
|
||||
../include/async_mqtt5/logger.hpp
|
||||
../include/async_mqtt5/reason_codes.hpp
|
||||
../include/async_mqtt5/types.hpp
|
||||
../include/async_mqtt5/mqtt_client.hpp
|
||||
:
|
||||
@call-doxygen
|
||||
local doxygen_include =
|
||||
error.hpp
|
||||
logger.hpp
|
||||
reason_codes.hpp
|
||||
types.hpp
|
||||
mqtt_client.hpp
|
||||
;
|
||||
|
||||
# combine.xslt is generated after using doxygen but bjam is unaware of it
|
||||
make xml/combine.xslt
|
||||
docca.pyreference reference.qbk
|
||||
:
|
||||
xml/index.xml
|
||||
[ glob-tree-ex ../include/boost/mqtt5 : $(doxygen_include) : detail impl ]
|
||||
:
|
||||
@null-action
|
||||
<doxygen:param>PROJECT_NAME=MQTT5
|
||||
<doxygen:param>PROJECT_BRIEF="C++ MQTT5 Client Library"
|
||||
<doxygen:param>DISTRIBUTE_GROUP_DOC=YES
|
||||
<doxygen:param>ENABLE_PREPROCESSING=YES
|
||||
<doxygen:param>MACRO_EXPANSION=YES
|
||||
<doxygen:param>EXPAND_ONLY_PREDEF=YES
|
||||
<doxygen:param>SEARCH_INCLUDES=NO
|
||||
<doxygen:param>STRIP_FROM_PATH=$(include-prefix)
|
||||
|
||||
<doxygen:param>SKIP_FUNCTION_MACROS=NO
|
||||
<doxygen:param>OUTPUT_LANGUAGE=English
|
||||
<doxygen:param>ABBREVIATE_BRIEF=
|
||||
<doxygen:param>AUTOLINK_SUPPORT=NO
|
||||
<doxygen:param>EXTRACT_ALL=YES
|
||||
<doxygen:param>HIDE_UNDOC_MEMBERS=YES
|
||||
<doxygen:param>HIDE_UNDOC_CLASSES=YES
|
||||
<doxygen:param>HIDE_FRIEND_COMPOUNDS=YES
|
||||
<doxygen:param>CASE_SENSE_NAMES=YES
|
||||
<doxygen:param>SHOW_INCLUDE_FILES=NO
|
||||
<doxygen:param>INLINE_INFO=NO
|
||||
<doxygen:param>SORT_MEMBER_DOCS=NO
|
||||
<doxygen:param>SORT_MEMBERS_CTORS_1ST=YES
|
||||
<doxygen:param>SHOW_USED_FILES=NO
|
||||
<doxygen:param>SHOW_FILES=NO
|
||||
<doxygen:param>SHOW_NAMESPACES=NO
|
||||
|
||||
<docca:config>config.json
|
||||
;
|
||||
|
||||
make xml/all.xml
|
||||
:
|
||||
xml/combine.xslt
|
||||
xml/index.xml
|
||||
:
|
||||
@call-xsltproc
|
||||
;
|
||||
|
||||
make reference.qbk
|
||||
:
|
||||
reference.xsl
|
||||
xml/all.xml
|
||||
:
|
||||
@call-xsltproc
|
||||
;
|
||||
|
||||
# We have to make a copy of reference.qbk and put it
|
||||
# in a place where the static .qbk files can find it
|
||||
install qbk/reference : reference.qbk ;
|
||||
|
||||
|
||||
actions null-action
|
||||
{
|
||||
# the action is used with "make" rule to make bjam aware that a file exists
|
||||
}
|
||||
|
||||
actions call-doxygen
|
||||
{
|
||||
doxygen $(2)
|
||||
}
|
||||
|
||||
actions call-xsltproc
|
||||
{
|
||||
xsltproc $(2) > $(1)
|
||||
}
|
||||
|
||||
install stylesheets
|
||||
:
|
||||
$(BOOST_ROOT)3rdParty/boost-doc/style/boostbook.css
|
||||
:
|
||||
<location>html/
|
||||
;
|
||||
|
||||
explicit stylesheets ;
|
||||
|
||||
install callouts
|
||||
:
|
||||
[ glob $(BOOST_ROOT)3rdParty/boost-doc/style/images/callouts/*.png ]
|
||||
:
|
||||
<location>html/images/callouts
|
||||
;
|
||||
|
||||
explicit callout ;
|
||||
|
||||
install images
|
||||
:
|
||||
[ glob $(BOOST_ROOT)3rdParty/boost-doc/style/images/*.png ]
|
||||
[ glob images/*.png ]
|
||||
:
|
||||
<location>html/images
|
||||
<location>html/mqtt5/images
|
||||
;
|
||||
|
||||
explicit images ;
|
||||
|
||||
xml async_mqtt5_doc
|
||||
xml mqtt5_doc
|
||||
:
|
||||
qbk/00_main.qbk
|
||||
:
|
||||
@ -126,23 +74,21 @@ xml async_mqtt5_doc
|
||||
<dependency>images
|
||||
;
|
||||
|
||||
explicit async_mqtt5_doc ;
|
||||
explicit mqtt5_doc ;
|
||||
|
||||
boostbook async_mqtt5
|
||||
|
||||
boostbook mqtt5
|
||||
:
|
||||
async_mqtt5_doc
|
||||
mqtt5_doc
|
||||
:
|
||||
<xsl:param>"boost.root=https://www.boost.org/doc/libs/1_82_0"
|
||||
<xsl:param>boost.graphics.root=images/
|
||||
<xsl:param>nav.layout=none
|
||||
<xsl:param>boost.root=../../../..
|
||||
<xsl:param>chapter.autolabel=1
|
||||
<xsl:param>chunk.section.depth=8
|
||||
<xsl:param>chunk.first.sections=1
|
||||
<xsl:param>toc.max.depth=2
|
||||
<xsl:param>generate.toc="chapter toc,title section nop reference nop part toc"
|
||||
<xsl:param>html.stylesheet=boostbook.css
|
||||
<include>../../../tools/boostbook/dtd
|
||||
:
|
||||
<dependency>stylesheets
|
||||
<dependency>images
|
||||
;
|
||||
|
||||
@ -152,5 +98,5 @@ boostbook async_mqtt5
|
||||
alias boostdoc ;
|
||||
explicit boostdoc ;
|
||||
|
||||
alias boostrelease : async_mqtt5 ;
|
||||
alias boostrelease : mqtt5 ;
|
||||
explicit boostrelease ;
|
||||
|
17
doc/config.json
Normal file
17
doc/config.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"include_private": false,
|
||||
"legacy_behavior": false,
|
||||
"external_marker": "!EXTERNAL!",
|
||||
"link_prefix": "mqtt5.ref.",
|
||||
"convenience_header": "boost/mqtt5.hpp",
|
||||
"replace_strings": {
|
||||
"__see_below__": "``['see-below]``",
|
||||
"\\btypename CompletionToken\\b": "typename __CompletionToken__",
|
||||
"\\btypename Executor\\b": "typename __Executor__",
|
||||
"\\btypename ExecutionContext\\b": "typename __ExecutionContext__",
|
||||
"\\btypename TlsContext\\b": "typename __TlsContext__",
|
||||
"\\btypename StreamType\\b": "typename __StreamType__",
|
||||
"\\bis_authenticator\\b": "__is_authenticator__",
|
||||
"\\btypename LoggerType\\b": "typename __LoggerType__"
|
||||
}
|
||||
}
|
@ -7,7 +7,7 @@
|
||||
[library Boost.MQTT5: a C++17 MQTT client
|
||||
[quickbook 1.7]
|
||||
[copyright 2023-2024 Mireo]
|
||||
[id async_mqtt5]
|
||||
[id mqtt5]
|
||||
[purpose C++17 MQTT client]
|
||||
[license
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
@ -22,13 +22,14 @@
|
||||
[template nochunk[] [block '''<?dbhtml stop-chunking?>''']]
|
||||
[template mdash[] '''— ''']
|
||||
[template hr[] '''<phrase role="silver">'''[mdash]'''</phrase>''']
|
||||
[template include_file[path][^<'''<ulink url="GITHUB_LINK">'''[path]'''</ulink>'''>]]
|
||||
[template link_to_file[path][^'''<ulink url="https://github.com/mireo/async_mqtt5/blob/master/'''[path]'''">'''[path]'''</ulink>''']]
|
||||
[template include_file[path][^<'''<ulink url="https://github.com/mireo/async_mqtt5/blob/master/include/'''[path]'''">'''[path]'''</ulink>'''>]]
|
||||
[template indexterm1[term1] '''<indexterm><primary>'''[term1]'''</primary></indexterm>''']
|
||||
[template indexterm2[term1 term2] '''<indexterm><primary>'''[term1]'''</primary><secondary>'''[term2]'''</secondary></indexterm>''']
|
||||
|
||||
[template ghreflink[path text] [@https://github.com/mireo/async-mqtt5/blob/master/[path] [text]]]
|
||||
[template reflink2[id text][link async_mqtt5.ref.[id] [^[text]]]]
|
||||
[template reflink[id][reflink2 [id] [id]]]
|
||||
[template reflink2[id text][link mqtt5.ref.boost__mqtt5__[id] [^[text]]]]
|
||||
[template reflink[id text][link mqtt5.ref.[id] [text]]]
|
||||
[template refmem[class mem][reflink2 [class].[mem] [class]::[mem]]]
|
||||
[template refmemunq[class mem][reflink2 [class].[mem] [mem]]]
|
||||
[template asioreflink[id term][@boost:/doc/html/boost_asio/reference/[id].html [^boost::asio::[term]]]]
|
||||
@ -39,13 +40,13 @@
|
||||
[def __OPENSSL__ [@https://www.openssl.org/ OpenSSL]]
|
||||
[def __HIVEMQ__ [@https://www.hivemq.com/ HiveMQ]]
|
||||
|
||||
[def __CompletionToken__ [@boost:/doc/html/boost_asio/reference/asynchronous_operations.html#boost_asio.reference.asynchronous_operations.completion_tokens_and_handlers CompletionToken]]
|
||||
[def __Executor__ [@boost:/doc/html/boost_asio/reference/Executor1.html Executor]]
|
||||
[def __ExecutionContext__ [reflink ExecutionContext]]
|
||||
[def __StreamType__ [reflink StreamType]]
|
||||
[def __TlsContext__ [reflink TlsContext]]
|
||||
[def __is_authenticator__ [reflink is_authenticator]]
|
||||
[def __LoggerType__ [reflink LoggerType]]
|
||||
[def __CompletionToken__ [@boost:/doc/html/boost_asio/reference/asynchronous_operations.html#boost_asio.reference.asynchronous_operations.completion_tokens_and_handlers ['CompletionToken]]]
|
||||
[def __Executor__ [@boost:/doc/html/boost_asio/reference/Executor1.html ['Executor]]]
|
||||
[def __ExecutionContext__ [reflink ExecutionContext ['ExecutionContext]]]
|
||||
[def __StreamType__ [reflink StreamType ['StreamType]]]
|
||||
[def __TlsContext__ [reflink TlsContext ['TlsContext]]]
|
||||
[def __is_authenticator__ [reflink is_authenticator ['is_authenticator]]]
|
||||
[def __LoggerType__ [reflink LoggerType ['LoggerType]]]
|
||||
|
||||
[def __Boost__ [@https://www.boost.org/ Boost]]
|
||||
[def __Asio__ [@boost:/libs/asio/index.html Boost.Asio]]
|
||||
@ -60,7 +61,7 @@
|
||||
[def __STRAND__ [@boost:doc/html/boost_asio/reference/io_context__strand.html `boost::asio::io_context::strand`]]
|
||||
[def __DISPATCH__ [@boost:doc/html/boost_asio/reference/dispatch.html `boost::asio::dispatch`]]
|
||||
[def __POST__ [@boost:doc/html/boost_asio/reference/post.html `boost::asio::post`]]
|
||||
[def __ASYNC_IMMEDIATE__ [@https://www.boost.org/doc/libs/1_86_0/doc/html/boost_asio/reference/async_immediate.html `boost::asio::async_immediate`]]
|
||||
[def __ASYNC_IMMEDIATE__ [@boost:doc/html/boost_asio/reference/async_immediate.html `boost::asio::async_immediate`]]
|
||||
[def __CO_SPAWN__ [@boost:/doc/html/boost_asio/reference/co_spawn.html `boost::asio::co_spawn`]]
|
||||
[def __USE_AWAITABLE__ [@boost:/doc/html/boost_asio/reference/use_awaitable.html `boost::asio::use_awaitable`]]
|
||||
[def __USE_FUTURE__ [@boost:/doc/html/boost_asio/reference/use_future.html `boost::asio::use_future`]]
|
||||
@ -86,6 +87,7 @@
|
||||
[def __RETAIN__ [mqttlink 3901104 `RETAIN`]]
|
||||
[def __SUBSCRIBE_OPTIONS__ [mqttlink 3901169 `Subscribe Options`]]
|
||||
[def __ENHANCED_AUTH__ [mqttlink 3901256 `Enhanced Authentication`]]
|
||||
[def __RE_AUTHENTICATION__ [mqttlink 3901257 `Re-authentication`]]
|
||||
[def __TOPIC_SEMANTIC_AND_USAGE__ [mqttlink 3901247 `Topic semantic and usage`]]
|
||||
|
||||
[def __CONNECT__ [mqttlink 3901033 `CONNECT`]]
|
||||
@ -104,29 +106,29 @@
|
||||
[def __DISCONNECT__ [mqttlink 3901205 `DISCONNECT`]]
|
||||
[def __AUTH__ [mqttlink 3901217 `AUTH`]]
|
||||
|
||||
[def __WILL_PROPS__ [reflink2 will_props async_mqtt5::will_props]]
|
||||
[def __CONNECT_PROPS__ [reflink2 connect_props async_mqtt5::connect_props]]
|
||||
[def __CONNACK_PROPS__ [reflink2 connack_props async_mqtt5::connack_props]]
|
||||
[def __PUBLISH_PROPS__ [reflink2 publish_props async_mqtt5::publish_props]]
|
||||
[def __PUBACK_PROPS__ [reflink2 puback_props async_mqtt5::puback_props]]
|
||||
[def __PUBREC_PROPS__ [reflink2 pubrec_props async_mqtt5::pubrec_props]]
|
||||
[def __PUBREL_PROPS__ [reflink2 pubrel_props async_mqtt5::pubrel_props]]
|
||||
[def __PUBCOMP_PROPS__ [reflink2 pubcomp_props async_mqtt5::pubcomp_props]]
|
||||
[def __SUBSCRIBE_PROPS__ [reflink2 subscribe_props async_mqtt5::subscribe_props]]
|
||||
[def __SUBACK_PROPS__ [reflink2 suback_props async_mqtt5::suback_props]]
|
||||
[def __UNSUBSCRIBE_PROPS__ [reflink2 unsubscribe_props async_mqtt5::unsubscribe_props]]
|
||||
[def __UNSUBACK_PROPS__ [reflink2 unsuback_props async_mqtt5::unsuback_props]]
|
||||
[def __DISCONNECT_PROPS__ [reflink2 disconnect_props async_mqtt5::disconnect_props]]
|
||||
[def __AUTH_PROPS__ [reflink2 auth_props async_mqtt5::auth_props]]
|
||||
[def __WILL_PROPS__ [reflink will_props `boost::mqtt5::will_props`]]
|
||||
[def __CONNECT_PROPS__ [reflink connect_props `boost::mqtt5::connect_props`]]
|
||||
[def __CONNACK_PROPS__ [reflink connack_props `boost::mqtt5::connack_props`]]
|
||||
[def __PUBLISH_PROPS__ [reflink publish_props `boost::mqtt5::publish_props`]]
|
||||
[def __PUBACK_PROPS__ [reflink puback_props `boost::mqtt5::puback_props`]]
|
||||
[def __PUBREC_PROPS__ [reflink pubrec_props `boost::mqtt5::pubrec_props`]]
|
||||
[def __PUBREL_PROPS__ [reflink pubrel_props `boost::mqtt5::pubrel_props`]]
|
||||
[def __PUBCOMP_PROPS__ [reflink pubcomp_props `boost::mqtt5::pubcomp_props`]]
|
||||
[def __SUBSCRIBE_PROPS__ [reflink subscribe_props `boost::mqtt5::subscribe_props`]]
|
||||
[def __SUBACK_PROPS__ [reflink suback_props `boost::mqtt5::suback_props`]]
|
||||
[def __UNSUBSCRIBE_PROPS__ [reflink unsubscribe_props `boost::mqtt5::unsubscribe_props`]]
|
||||
[def __UNSUBACK_PROPS__ [reflink unsuback_props `boost::mqtt5::unsuback_props`]]
|
||||
[def __DISCONNECT_PROPS__ [reflink disconnect_props `boost::mqtt5::disconnect_props`]]
|
||||
[def __AUTH_PROPS__ [reflink auth_props `boost::mqtt5::auth_props`]]
|
||||
|
||||
[def __KEEP_ALIVE__ [mqttlink 3901045 `Keep Alive`]]
|
||||
[def __SERVER_KEEP_ALIVE__ [mqttlink 3901094 `Server Keep Alive`]]
|
||||
|
||||
[def __ERROR_CODE__ [reflink2 error_code `async_mqtt5::error_code`]]
|
||||
[def __REASON_CODE__ [reflink2 reason_code `async_mqtt5::reason_code`]]
|
||||
[def __ERROR_CODE__ [reflink2 error_code `boost::mqtt5::error_code`]]
|
||||
[def __REASON_CODE__ [reflink2 reason_code `boost::mqtt5::reason_code`]]
|
||||
|
||||
[def __REASON_CODES__ [reflink2 Reason_codes `Reason Codes`]]
|
||||
[def __ERROR_HANDLING__ [reflink2 Error_handling `Error handling`]]
|
||||
[def __REASON_CODES__ [reflink Reason_codes `Reason Codes`]]
|
||||
[def __ERROR_HANDLING__ [reflink Error_handling `Error handling`]]
|
||||
|
||||
[import ../../example/hello_world_over_tcp.cpp]
|
||||
[import ../../example/hello_world_over_tls.cpp]
|
||||
@ -155,6 +157,27 @@
|
||||
[section:ref Reference]
|
||||
[xinclude reference/quickref.xml]
|
||||
[block'''<part label="Two: Reference">''']
|
||||
[include reference/reference.qbk]
|
||||
[include reference.qbk]
|
||||
[include reference/Error_handling.qbk]
|
||||
[include reference/concepts/ExecutionContext.qbk]
|
||||
[include reference/concepts/StreamType.qbk]
|
||||
[include reference/concepts/TlsContext.qbk]
|
||||
[include reference/concepts/is_authenticator.qbk]
|
||||
[include reference/concepts/LoggerType.qbk]
|
||||
[include reference/reason_codes/Reason_codes.qbk]
|
||||
[include reference/properties/will_props.qbk]
|
||||
[include reference/properties/connect_props.qbk]
|
||||
[include reference/properties/connack_props.qbk]
|
||||
[include reference/properties/publish_props.qbk]
|
||||
[include reference/properties/puback_props.qbk]
|
||||
[include reference/properties/pubrec_props.qbk]
|
||||
[include reference/properties/pubrel_props.qbk]
|
||||
[include reference/properties/pubcomp_props.qbk]
|
||||
[include reference/properties/subscribe_props.qbk]
|
||||
[include reference/properties/suback_props.qbk]
|
||||
[include reference/properties/unsubscribe_props.qbk]
|
||||
[include reference/properties/unsuback_props.qbk]
|
||||
[include reference/properties/disconnect_props.qbk]
|
||||
[include reference/properties/auth_props.qbk]
|
||||
[block'''</part>''']
|
||||
[endsect]
|
||||
|
@ -79,7 +79,7 @@ The library attempts to embody this belief with a range of key features designed
|
||||
[
|
||||
Automatically handles connection loss, backoffs, reconnections, and message transmissions.
|
||||
Automating these processes enables users to focus entirely on the application's functionality.
|
||||
See [link async_mqtt5.auto_reconnect Built-in Auto-Reconnect and Retry Mechanism].
|
||||
See [link mqtt5.auto_reconnect Built-in Auto-Reconnect and Retry Mechanism].
|
||||
]
|
||||
]
|
||||
[
|
||||
@ -207,7 +207,7 @@ The following example illustrates a scenario of configuring a Client and publish
|
||||
ioc.run();
|
||||
}
|
||||
|
||||
To see more examples, visit [link async_mqtt5.examples Examples].
|
||||
To see more examples, visit [link mqtt5.examples Examples].
|
||||
|
||||
[heading Acknowledgements]
|
||||
We thank [@https://github.com/chriskohlhoff Christopher Kohlhoff] for his outstanding __Asio__ library,
|
||||
|
@ -35,7 +35,7 @@ In this example, we choose TCP/IP as the underlying protocol to initialize the _
|
||||
boost::asio::io_context ioc;
|
||||
|
||||
// Construct the Client with ``__TCP_SOCKET__`` as the underlying stream.
|
||||
async_mqtt5::mqtt_client<boost::asio::ip::tcp::socket> client(ioc);
|
||||
boost::mqtt5::mqtt_client<boost::asio::ip::tcp::socket> client(ioc);
|
||||
|
||||
[endsect] [/transport_protocol]
|
||||
|
||||
@ -106,13 +106,13 @@ In this case, we will publish a "Hello World!" message to `async-mqtt5/test` top
|
||||
|
||||
You can find the full program listing for this chapter at the link below:
|
||||
|
||||
* [link async_mqtt5.hello_world_over_tcp hello_world_over_tcp.cpp]
|
||||
* [link mqtt5.hello_world_over_tcp hello_world_over_tcp.cpp]
|
||||
|
||||
Additional "Hello World!" examples for different underlying transport protocols can be found here:
|
||||
|
||||
* [link async_mqtt5.hello_world_over_tls hello_world_over_tls.cpp]
|
||||
* [link async_mqtt5.hello_world_over_websocket_tcp hello_world_over_websocket_tcp.cpp]
|
||||
* [link async_mqtt5.hello_world_over_websocket_tls hello_world_over_websocket_tls.cpp]
|
||||
* [link mqtt5.hello_world_over_tls hello_world_over_tls.cpp]
|
||||
* [link mqtt5.hello_world_over_websocket_tcp hello_world_over_websocket_tcp.cpp]
|
||||
* [link mqtt5.hello_world_over_websocket_tls hello_world_over_websocket_tls.cpp]
|
||||
|
||||
[endsect] [/using_the_client]
|
||||
|
||||
@ -121,7 +121,7 @@ Additional "Hello World!" examples for different underlying transport protocols
|
||||
If you encounter configuration or connection issues, you can use our logging mechanism to debug problems.
|
||||
The __Client__ introduces a __LoggerType__ as its third template parameter, which specifies the type used for logging events within the __Client__.
|
||||
|
||||
The __Self__ library provides a built-in [ghreflink include/async_mqtt5/logger.hpp logger] implementation that outputs operation results to stderr.
|
||||
The __Self__ library provides a built-in [ghreflink include/boost/mqtt5/logger.hpp logger] implementation that outputs operation results to stderr.
|
||||
This logger outputs detailed information about each step in the connection process, including DNS resolution, TCP connection, TLS handshake, WebSocket handshake, and MQTT handshake.
|
||||
To enable this functionality, construct the __Client__ with an instance of this logger class:
|
||||
|
||||
|
@ -38,10 +38,10 @@ and [refmem mqtt_client async_disconnect]).
|
||||
// 4) The PUBACK message should arrive within 20 seconds of the PUBLISH message being successfully sent.
|
||||
// If it does not, the PUBLISH message will be sent again. In the meantime, the user's callback will not be invoked.
|
||||
|
||||
client.async_publish<async_mqtt5::qos_e::at_least_once>(
|
||||
client.async_publish<boost::mqtt5::qos_e::at_least_once>(
|
||||
"my-topic", "Hello world!",
|
||||
async_mqtt5::retain_e::no, async_mqtt5::publish_props {},
|
||||
[](async_mqtt5::error_code ec, async_mqtt5::reason_code rc, async_mqtt5::puback_props props) {
|
||||
boost::mqtt5::retain_e::no, boost::mqtt5::publish_props {},
|
||||
[](boost::mqtt5::error_code ec, boost::mqtt5::reason_code rc, boost::mqtt5::puback_props props) {
|
||||
// This callback is invoked under any of the following circumstances:
|
||||
// a) The Client successfully sends the PUBLISH packet and receives a PUBACK from the Broker.
|
||||
// b) The Client encounters a non-recoverable error, such as a cancellation or providing invalid parameters
|
||||
@ -94,7 +94,7 @@ If the decision for reconnection were left to the user, then the user would need
|
||||
which would dramatically increase the complexity of the user's code, not to mention how difficult it would be to cover all possible error states.
|
||||
|
||||
The proposed approach for detecting configuration errors in the __Client__ is to use our logging mechanism as described
|
||||
in [link async_mqtt5.getting_started.debugging Debugging the Client]
|
||||
in [link mqtt5.getting_started.debugging Debugging the Client]
|
||||
|
||||
[heading Increased Resource Consumption]
|
||||
|
||||
|
@ -80,7 +80,7 @@ to receive some data
|
||||
[footnote The __Client__ is not required to specifically receive __PINGRESP__ to its __PINGREQ__. Any data from the Broker will suffice to confirm its status.]
|
||||
from the Broker within `1.5` times the negotiated `Keep Alive` seconds.
|
||||
If no data is received within this time, the __Client__ will assume a half-open state and initiate a reconnect procedure
|
||||
described in the [link async_mqtt5.auto_reconnect Built-in auto-reconnect and retry mechanism].
|
||||
described in the [link mqtt5.auto_reconnect Built-in auto-reconnect and retry mechanism].
|
||||
|
||||
[important If the negotiated `Keep Alive` value is set to `0`, the timeout mechanism to detect a half-open connection
|
||||
is disabled. As a result, the __Client__ loses its capability to identify and adequately respond to half-open scenarios.]
|
||||
|
@ -35,7 +35,7 @@ It is important to note that there is no guarantee that the final handlers will
|
||||
in the same order as the corresponding `async_xxx` calls were initiated.
|
||||
|
||||
[import ../../example/multiflight_client.cpp]
|
||||
Source: [link async_mqtt5.multiflight_client multiflight_client.cpp]
|
||||
Source: [link mqtt5.multiflight_client multiflight_client.cpp]
|
||||
[multiflight_client]
|
||||
|
||||
[endsect] [/multiflight]
|
||||
@ -56,7 +56,7 @@ __Client__ evaluates the current count of unacknowledged __PUBLISH__ packets aga
|
||||
If the count is below this threshold, __Client__ dispatches the __PUBLISH__ packet.
|
||||
Otherwise, it remains in the queue until the count decreases below the threshold.
|
||||
|
||||
As a result, in the [link async_mqtt5.multiflight_client multiflight_client.cpp] example,
|
||||
As a result, in the [link mqtt5.multiflight_client multiflight_client.cpp] example,
|
||||
the __Client__ will transmit all `5` __PUBLISH__ packets in a single TCP packet
|
||||
if possible [footnote The Broker's `Receive Maximum` is equal to or greater than `5`.].
|
||||
|
||||
@ -75,7 +75,7 @@ A Broker can set this value to limit the number of simultaneous QoS > 0 messages
|
||||
potentially causing QoS 0 messages to be transmitted ahead of QoS > 0 messages in the delivery order.
|
||||
|
||||
- The __DISCONNECT__ packet is sent *in a single TCP packet before any other packets* in the queue.
|
||||
See [link async_mqtt5.disconnecting_the_client Disconnecting the client] for more information about disconnecting.
|
||||
See [link mqtt5.disconnecting_the_client Disconnecting the client] for more information about disconnecting.
|
||||
|
||||
[endsect] [/packet_ordering]
|
||||
|
||||
|
@ -40,14 +40,14 @@ followed by the request to disconnect the __Client__.
|
||||
int main() {
|
||||
boost::asio::io_context ioc;
|
||||
|
||||
async_mqtt5::mqtt_client<boost::asio::ip::tcp::socket> client(ioc);
|
||||
boost::mqtt5::mqtt_client<boost::asio::ip::tcp::socket> client(ioc);
|
||||
client.brokers("<your-mqtt-broker>", 1883)
|
||||
.async_run(boost::asio::detached);
|
||||
|
||||
client.async_publish<async_mqtt5::qos_e::at_most_once>(
|
||||
client.async_publish<boost::mqtt5::qos_e::at_most_once>(
|
||||
"<topic>", "Hello world!",
|
||||
async_mqtt5::retain_e::no, async_mqtt5::publish_props {},
|
||||
[](async_mqtt5::error_code ec) {
|
||||
boost::mqtt5::retain_e::no, boost::mqtt5::publish_props {},
|
||||
[](boost::mqtt5::error_code ec) {
|
||||
std::cout << ec.message() << std::endl;
|
||||
}
|
||||
);
|
||||
@ -65,7 +65,7 @@ order of events will unfold:
|
||||
# The Client will send a __DISCONNECT__ packet with Reason Code `0x00` (`Normal Disconnection`).
|
||||
|
||||
It is important to note that the __PUBLISH__ packet containing the "Hello World!" message will not be transmitted.
|
||||
As outlined in the `Packet Ordering` in [link async_mqtt5.optimising_communication Optimising communication] section,
|
||||
As outlined in the `Packet Ordering` in [link mqtt5.optimising_communication Optimising communication] section,
|
||||
[refmem mqtt_client async_publish] and [refmem mqtt_client async_disconnect] will place their corresponding
|
||||
packets in the queue. However, __DISCONNECT__ packets are prioritised and sent exclusively, ahead of other queued packets.
|
||||
Therefore, the connection will terminate immediately.
|
||||
@ -80,10 +80,10 @@ In this case, the proper way to disconnect would be to call [refmem mqtt_client
|
||||
[refmem mqtt_client async_publish] has been completed.
|
||||
|
||||
```
|
||||
client.async_publish<async_mqtt5::qos_e::at_most_once>(
|
||||
client.async_publish<boost::mqtt5::qos_e::at_most_once>(
|
||||
"<topic>", "Hello world!",
|
||||
async_mqtt5::retain_e::no, async_mqtt5::publish_props {},
|
||||
[&client](async_mqtt5::error_code ec) {
|
||||
boost::mqtt5::retain_e::no, boost::mqtt5::publish_props {},
|
||||
[&client](boost::mqtt5::error_code ec) {
|
||||
std::cout << ec.message() << std::endl;
|
||||
client.async_disconnect(boost::asio::detached);
|
||||
}
|
||||
@ -96,20 +96,20 @@ Once the __Client__ has been successfully stopped, reactivating it is straightfo
|
||||
This method can be called right after initiating [refmem mqtt_client async_disconnect], without waiting for it to complete.
|
||||
|
||||
The __Client__ is configurable again in the interval between stopping and restarting.
|
||||
See [link async_mqtt5.getting_started.configuration Configuring Your MQTT Connection] for more information.
|
||||
See [link mqtt5.getting_started.configuration Configuring Your MQTT Connection] for more information.
|
||||
|
||||
```
|
||||
int main() {
|
||||
boost::asio::io_context ioc;
|
||||
|
||||
async_mqtt5::mqtt_client<boost::asio::ip::tcp::socket> client(ioc);
|
||||
boost::mqtt5::mqtt_client<boost::asio::ip::tcp::socket> client(ioc);
|
||||
client.brokers("<your-mqtt-broker>", 1883)
|
||||
.async_run(boost::asio::detached);
|
||||
|
||||
client.async_disconnect(boost::asio::detached);
|
||||
|
||||
// The Client can be reconfigured again.
|
||||
client.connect_property(async_mqtt5::prop::session_expiry_interval, 120)
|
||||
client.connect_property(boost::mqtt5::prop::session_expiry_interval, 120)
|
||||
.keep_alive(30)
|
||||
.async_run(boost::asio::detached); // Restart the Client again.
|
||||
|
||||
|
@ -15,11 +15,11 @@ Every asynchronous operation in __Asio__ has associated characteristics that spe
|
||||
This section expands further into the roles of allocators,
|
||||
cancellation slots, and executors, highlighting their integration and usage within the __Client__.
|
||||
|
||||
* See [link async_mqtt5.asio_compliance.allocators Allocators] for more information about how the
|
||||
* See [link mqtt5.asio_compliance.allocators Allocators] for more information about how the
|
||||
__Client__ supports and uses associated allocators.
|
||||
* See [link async_mqtt5.asio_compliance.per_op_cancellation Per-Operation Cancellation] for more information about how
|
||||
* See [link mqtt5.asio_compliance.per_op_cancellation Per-Operation Cancellation] for more information about how
|
||||
asynchronous operations within the __Client__ support cancellation.
|
||||
* See [link async_mqtt5.asio_compliance.executors Executors] for more information about executors.
|
||||
* See [link mqtt5.asio_compliance.executors Executors] for more information about executors.
|
||||
|
||||
[include 08_allocators.qbk]
|
||||
[include 09_per_op_cancellation.qbk]
|
||||
|
@ -18,7 +18,7 @@ to store the state associated with the operation.
|
||||
Specifically, the allocator is used to reserve memory for MQTT Control Packet bytes
|
||||
(__PUBLISH__, __SUBSCRIBE__,...) created by each `async_xxx` operation request.
|
||||
Moreover, the __Client__'s internal packet queue
|
||||
(described in the section ['Efficient bandwidth usage with packet queuing] in [link async_mqtt5.optimising_communication Optimising communication])
|
||||
(described in the section ['Efficient bandwidth usage with packet queuing] in [link mqtt5.optimising_communication Optimising communication])
|
||||
associates the allocator of the first packet in the queue to the low-level __Asio__ function
|
||||
`async_write` on the transport layer.
|
||||
|
||||
|
@ -42,19 +42,19 @@ In such cases, the cancellation would specifically target resending the __PUBLIS
|
||||
preventing it from being retransmitted should the client reconnect during the ongoing operation.
|
||||
|
||||
```
|
||||
async_mqtt5::mqtt_client<boost::asio::ip::tcp::socket> client(ioc);
|
||||
boost::mqtt5::mqtt_client<boost::asio::ip::tcp::socket> client(ioc);
|
||||
|
||||
client.brokers("<your-mqtt-broker>", 1883)
|
||||
.async_run(boost::asio::detached);
|
||||
|
||||
boost::asio::cancellation_signal signal;
|
||||
|
||||
client.async_publish<async_mqtt5::qos_e::at_least_once>(
|
||||
client.async_publish<boost::mqtt5::qos_e::at_least_once>(
|
||||
"<topic>", "Hello world!",
|
||||
async_mqtt5::retain_e::no, async_mqtt5::publish_props {},
|
||||
boost::mqtt5::retain_e::no, boost::mqtt5::publish_props {},
|
||||
boost::asio::bind_cancellation_slot(
|
||||
signal.slot(),
|
||||
[&client](async_mqtt5::error_code ec, async_mqtt5::reason_code rc, async_mqtt5::puback_props props ) {
|
||||
[&client](boost::mqtt5::error_code ec, boost::mqtt5::reason_code rc, boost::mqtt5::puback_props props ) {
|
||||
std::cout << ec.message() << std::endl;
|
||||
}
|
||||
)
|
||||
@ -70,8 +70,8 @@ This feature is especially beneficial for executing operations that require a ti
|
||||
|
||||
Below are two examples illustrating how to implement a timeout:
|
||||
|
||||
* [link async_mqtt5.timeout_with_parallel_group timeout_with_parallel_group.cpp]
|
||||
* [link async_mqtt5.timeout_with_awaitable_operators timeout_with_awaitable_operators.cpp]
|
||||
* [link mqtt5.timeout_with_parallel_group timeout_with_parallel_group.cpp]
|
||||
* [link mqtt5.timeout_with_awaitable_operators timeout_with_awaitable_operators.cpp]
|
||||
|
||||
[endsect] [/parallel_group]
|
||||
|
||||
|
@ -35,17 +35,17 @@ int main() {
|
||||
|
||||
// Construct the Client with a strand.
|
||||
auto strand = boost::asio::make_strand(ioc.get_executor());
|
||||
async_mqtt5::mqtt_client<boost::asio::ip::tcp::socket> client(strand);
|
||||
boost::mqtt5::mqtt_client<boost::asio::ip::tcp::socket> client(strand);
|
||||
|
||||
client.brokers("<your-mqtt-broker>", 1883)
|
||||
.async_run(boost::asio::detached);
|
||||
|
||||
// This asynchronous operation will use the default associated executor,
|
||||
// which is the strand with which the Client is constructed.
|
||||
client.async_publish<async_mqtt5::qos_e::at_most_once>(
|
||||
client.async_publish<boost::mqtt5::qos_e::at_most_once>(
|
||||
"<topic>", "Hello world!",
|
||||
async_mqtt5::retain_e::no, async_mqtt5::publish_props {},
|
||||
[&client, &strand](async_mqtt5::error_code /* ec */) {
|
||||
boost::mqtt5::retain_e::no, boost::mqtt5::publish_props {},
|
||||
[&client, &strand](boost::mqtt5::error_code /* ec */) {
|
||||
assert(strand.running_in_this_thread());
|
||||
client.cancel();
|
||||
}
|
||||
|
@ -82,8 +82,8 @@ is carried out within the strand, thereby ensuring thread safety.
|
||||
The examples below demonstrate how to publish a "Hello World" Application Message
|
||||
in a multithreaded setting using callbacks (`post`/`dispatch`) and coroutines (`co_spawn`):
|
||||
|
||||
* [link async_mqtt5.hello_world_in_multithreaded_env hello_world_in_multithreaded_env.cpp]
|
||||
* [link async_mqtt5.hello_world_in_coro_multithreaded_env hello_world_in_coro_multithreaded_env.cpp]
|
||||
* [link mqtt5.hello_world_in_multithreaded_env hello_world_in_multithreaded_env.cpp]
|
||||
* [link mqtt5.hello_world_in_coro_multithreaded_env hello_world_in_coro_multithreaded_env.cpp]
|
||||
|
||||
|
||||
[endsect] [/thread_safe_code]
|
||||
|
@ -11,53 +11,53 @@ The following list contains all the examples that showcase how to use the __Clie
|
||||
|
||||
[variablelist
|
||||
[
|
||||
[[link async_mqtt5.publisher publisher.cpp]]
|
||||
[[link mqtt5.publisher publisher.cpp]]
|
||||
[Shows how to use the __Client__ as a publisher. The __Client__ publishes sensor readings every `5 seconds`.]
|
||||
]
|
||||
[
|
||||
[[link async_mqtt5.receiver receiver.cpp]]
|
||||
[[link mqtt5.receiver receiver.cpp]]
|
||||
[Shows how to use the __Client__ as a receiver. The __Client__ subscribes and indefinitely receives Application Messages from the Broker.]
|
||||
]
|
||||
[
|
||||
[[link async_mqtt5.hello_world_over_tcp hello_world_over_tcp.cpp]]
|
||||
[[link mqtt5.hello_world_over_tcp hello_world_over_tcp.cpp]]
|
||||
[Publishes a "Hello World" message via TCP/IP.]
|
||||
]
|
||||
[
|
||||
[[link async_mqtt5.hello_world_over_tls hello_world_over_tls.cpp]]
|
||||
[[link mqtt5.hello_world_over_tls hello_world_over_tls.cpp]]
|
||||
[Publishes a "Hello World" message via TLS/SSL.]
|
||||
]
|
||||
[
|
||||
[[link async_mqtt5.hello_world_over_websocket_tcp hello_world_over_websocket_tcp.cpp]]
|
||||
[[link mqtt5.hello_world_over_websocket_tcp hello_world_over_websocket_tcp.cpp]]
|
||||
[Publishes a "Hello World" message via Websocket/TLS.]
|
||||
]
|
||||
[
|
||||
[[link async_mqtt5.hello_world_over_websocket_tls hello_world_over_websocket_tls.cpp]]
|
||||
[[link mqtt5.hello_world_over_websocket_tls hello_world_over_websocket_tls.cpp]]
|
||||
[Publishes a "Hello World" message via Websocket/TLS.]
|
||||
]
|
||||
[
|
||||
[[link async_mqtt5.multiflight_client multiflight_client.cpp]]
|
||||
[[link mqtt5.multiflight_client multiflight_client.cpp]]
|
||||
[Shows how to use the __Client__ to simultaneously dispatch multiple requests.]
|
||||
]
|
||||
[
|
||||
[[link async_mqtt5.timeout_with_parallel_group timeout_with_parallel_group.cpp]]
|
||||
[[link mqtt5.timeout_with_parallel_group timeout_with_parallel_group.cpp]]
|
||||
[
|
||||
Shows how to use the __Client__ with its support for per-operation cancellation to perform operations under a time constraint
|
||||
using a parallel group.
|
||||
]
|
||||
]
|
||||
[
|
||||
[[link async_mqtt5.timeout_with_awaitable_operators timeout_with_awaitable_operators.cpp]]
|
||||
[[link mqtt5.timeout_with_awaitable_operators timeout_with_awaitable_operators.cpp]]
|
||||
[
|
||||
Shows how to use the __Client__ with its support for per-operation cancellation to perform operations under a time constraint
|
||||
using awaitable operators.
|
||||
]
|
||||
]
|
||||
[
|
||||
[[link async_mqtt5.hello_world_in_multithreaded_env hello_world_in_multithreaded_env.cpp]]
|
||||
[[link mqtt5.hello_world_in_multithreaded_env hello_world_in_multithreaded_env.cpp]]
|
||||
[Shows how to publish a "Hello World" message in a multithreaded environment using callbacks (`post`/`dispatch`).]
|
||||
]
|
||||
[
|
||||
[[link async_mqtt5.hello_world_in_coro_multithreaded_env hello_world_in_coro_multithreaded_env.cpp]]
|
||||
[[link mqtt5.hello_world_in_coro_multithreaded_env hello_world_in_coro_multithreaded_env.cpp]]
|
||||
[Shows how to publish a "Hello World" message in a multithreaded environment using coroutines (`co_spawn`).]
|
||||
]
|
||||
]
|
||||
|
@ -24,27 +24,27 @@ may complete with, along with the reasons for their occurrence.
|
||||
to establish a connection with the Server. The cause of this error may be attributed to the connection
|
||||
related parameters used during the initialization of the [reflink2 mqtt_client `mqtt_client`].
|
||||
]]
|
||||
[[`async_mqtt5::client::error::malformed_packet`][
|
||||
[[`boost::mqtt5::client::error::malformed_packet`][
|
||||
The Client has attempted to send a packet that does not conform to the specification.
|
||||
This issue can arise from improperly formed UTF-8 encoded strings.
|
||||
Additionally, this error can be caused by providing out-of-range values.
|
||||
]]
|
||||
[[`async_mqtt5::client::error::packet_too_large`][
|
||||
[[`boost::mqtt5::client::error::packet_too_large`][
|
||||
The Client has attempted to send a packet larger than the Maximum Packet Size the Server
|
||||
is willing to process.
|
||||
]]
|
||||
[[`async_mqtt5::client::error::session_expired`][
|
||||
[[`boost::mqtt5::client::error::session_expired`][
|
||||
The Client has established a successful connection with a Server, but either the session does not exist or has expired.
|
||||
In cases where the Client had previously set up subscriptions to Topics, these subscriptions are also expired.
|
||||
Therefore, the Client should re-subscribe.
|
||||
This error code is exclusive to completion handlers associated with [refmem mqtt_client async_receive] calls.
|
||||
]]
|
||||
[[`async_mqtt5::client::error::pid_overrun`] [
|
||||
[[`boost::mqtt5::client::error::pid_overrun`] [
|
||||
This error code signifies that the Client was unable to allocate a Packet Identifier for
|
||||
the current operation due to the exhaustion of the available identifiers.
|
||||
This occurs when there are 65535 outgoing Packets awaiting their responses.
|
||||
]]
|
||||
[[`async_mqtt5::client::error::invalid_topic`] [
|
||||
[[`boost::mqtt5::client::error::invalid_topic`] [
|
||||
The Client has attempted to perform an action (publish, subscribe or unsubscribe) on an invalid Topic.
|
||||
See __TOPIC_SEMANTIC_AND_USAGE__ for information on properly formed Topics.
|
||||
This error code is exclusive to completion handlers associated with [refmem mqtt_client async_publish],
|
||||
@ -52,36 +52,36 @@ may complete with, along with the reasons for their occurrence.
|
||||
In the case of [refmem mqtt_client async_subscribe] and [refmem mqtt_client async_unsubscribe], this error code
|
||||
occurs if at least one Topic provided is malformed.
|
||||
]]
|
||||
[[`async_mqtt5::client::error::qos_not_supported`] [
|
||||
[[`boost::mqtt5::client::error::qos_not_supported`] [
|
||||
The Client has attempted to publish an Application Message with __QOS__ higher
|
||||
than the Maximum __QOS__ specified by the Server.
|
||||
The Server does not support this __QOS__ (see __MAXIMUM_QOS__).
|
||||
This error code is exclusive to completion handlers associated with [refmem mqtt_client async_publish] calls.
|
||||
]]
|
||||
[[`async_mqtt5::client::error::retain_not_available`] [
|
||||
[[`boost::mqtt5::client::error::retain_not_available`] [
|
||||
The Client has attempted to publish an Application Message with the __RETAIN__ flag set to 1.
|
||||
However, the Server does not support retained messages (see __RETAIN_AVAILABLE__).
|
||||
This error code is exclusive to completion handlers associated with [refmem mqtt_client async_publish] calls.
|
||||
]]
|
||||
[[`async_mqtt5::client::error::topic_alias_maximum`] [
|
||||
[[`boost::mqtt5::client::error::topic_alias_maximum`] [
|
||||
The Client has attempted to publish an Application Message with the Topic Alias
|
||||
exceeding the Server's supported Topic Alias Maximum. Additionally, this error code
|
||||
will arise in instances when the Server does NOT support Topic Aliases, and the
|
||||
Client has attempted to use them. See __TOPIC_ALIAS_MAX__.
|
||||
This error code is exclusive to completion handlers associated with [refmem mqtt_client async_publish] calls.
|
||||
]]
|
||||
[[`async_mqtt5::client::error::wildcard_subscription_not_available`] [
|
||||
[[`boost::mqtt5::client::error::wildcard_subscription_not_available`] [
|
||||
The Client has attempted to subscribe to multiple Topics using Wildcard Character (`+` and/or `#`).
|
||||
However, the Server does not support Wildcard Subscriptions.
|
||||
This error code is exclusive to completion handlers associated with [refmem mqtt_client async_subscribe] calls.
|
||||
]]
|
||||
[[`async_mqtt5::client::error::subscription_identifier_not_available`] [
|
||||
[[`boost::mqtt5::client::error::subscription_identifier_not_available`] [
|
||||
The Client has attempted to associate a subscription with a Subscription Identifier.
|
||||
However, the Server either does not support Subscription Identifiers or the Subscription Identifier provided
|
||||
is out of range (the Subscription Identifier can have a value of 1 to 268,435,455).
|
||||
This error code is exclusive to completion handlers associated with [refmem mqtt_client async_subscribe] calls.
|
||||
]]
|
||||
[[`async_mqtt5::client::error::shared_subscription_not_available`] [
|
||||
[[`boost::mqtt5::client::error::shared_subscription_not_available`] [
|
||||
The Client has attempted to establish a Shared Subscription.
|
||||
However, the Server does not support Shared Subscriptions.
|
||||
This error code is exclusive to completion handlers associated with [refmem mqtt_client async_subscribe] calls.
|
||||
|
@ -82,6 +82,6 @@ If the __Client__ is initialized with an explicit or implicit strand, none of th
|
||||
|
||||
[warning Defined functions should not block and stop the __Client__ from doing work. ]
|
||||
|
||||
A class that satifies this concept is [ghreflink include/async_mqtt5/logger.hpp logger].
|
||||
A class that satifies this concept is [ghreflink include/boost/mqtt5/logger.hpp logger].
|
||||
|
||||
[endsect]
|
||||
|
@ -14,7 +14,7 @@ A type `Authenticator` satisfies `is_authenticator` concept if it satisifes the
|
||||
[```a.async_auth(step, data, h)```]
|
||||
[`void`]
|
||||
[
|
||||
[*`step`] is [reflink2 auth_step_e async_mqtt5::auth_step_e] that specifies current authentication stage.
|
||||
[*`step`] is [reflink2 auth_step_e boost::mqtt5::auth_step_e] that specifies current authentication stage.
|
||||
|
||||
[*`data`] is `std::string`, server's authentication data.
|
||||
|
||||
|
@ -21,33 +21,33 @@ This section lists all possible __AUTH__ Properties and describes their usage:
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::auth_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::auth_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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 `std::vector<std::pair<std::string, std::string>>`.]
|
||||
except for `boost::mqtt5::prop::user_property`, where it will return an instance of `std::vector<std::pair<std::string, std::string>>`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::auth_props props;
|
||||
props[async_mqtt5::prop::authentication_method] = "SCRAM-SHA-1";
|
||||
props[async_mqtt5::prop::authentication_data] = "data";
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::auth_props props;
|
||||
props[boost::mqtt5::prop::authentication_method] = "SCRAM-SHA-1";
|
||||
props[boost::mqtt5::prop::authentication_data] = "data";
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::optional<std::string> auth_data = props[async_mqtt5::prop::authentication_data];
|
||||
std::optional<std::string> auth_data = props[boost::mqtt5::prop::authentication_data];
|
||||
if (auth_data.has_value())
|
||||
// authentication data property was previously set
|
||||
else
|
||||
// authentication data property was not set
|
||||
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -37,33 +37,33 @@ This section lists all possible __CONNACK__ Properties and describes their usage
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::connack_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::connack_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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 `std::vector<std::pair<std::string, std::string>>`.]
|
||||
except for `boost::mqtt5::prop::user_property`, where it will return an instance of `std::vector<std::pair<std::string, std::string>>`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::connack_props props;
|
||||
props[async_mqtt5::prop::maximum_packet_size] = 65535;
|
||||
props[async_mqtt5::prop::assigned_client_identifier] = "ClientID";
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::connack_props props;
|
||||
props[boost::mqtt5::prop::maximum_packet_size] = 65535;
|
||||
props[boost::mqtt5::prop::assigned_client_identifier] = "ClientID";
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::optional<std::string> auth_method = props[async_mqtt5::prop::authentication_method];
|
||||
std::optional<std::string> auth_method = props[boost::mqtt5::prop::authentication_method];
|
||||
if (auth_method.has_value())
|
||||
// authentication method property was previously set
|
||||
else
|
||||
// authentication method property was not set
|
||||
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -28,33 +28,33 @@ This section lists all possible __CONNECT__ Properties and describes their usage
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::connect_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::connect_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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 `std::vector<std::pair<std::string, std::string>>`.]
|
||||
except for `boost::mqtt5::prop::user_property`, where it will return an instance of `std::vector<std::pair<std::string, std::string>>`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::connect_props props;
|
||||
props[async_mqtt5::prop::session_expiry_interval] = 1200;
|
||||
props[async_mqtt5::prop::receive_maximum] = uint16_t(100);
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::connect_props props;
|
||||
props[boost::mqtt5::prop::session_expiry_interval] = 1200;
|
||||
props[boost::mqtt5::prop::receive_maximum] = uint16_t(100);
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::optional<std::string> auth_method = props[async_mqtt5::prop::authentication_method];
|
||||
std::optional<std::string> auth_method = props[boost::mqtt5::prop::authentication_method];
|
||||
if (auth_method.has_value())
|
||||
// authentication method property was previously set
|
||||
else
|
||||
// authentication method property was not set
|
||||
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -21,32 +21,32 @@ This section lists all possible __DISCONNECT__ Properties and describes their us
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::disconnect_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::disconnect_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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 `std::vector<std::pair<std::string, std::string>>`.]
|
||||
except for `boost::mqtt5::prop::user_property`, where it will return an instance of `std::vector<std::pair<std::string, std::string>>`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::disconnect_props props;
|
||||
props[async_mqtt5::prop::reason_string] = "Lost connection!";
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::disconnect_props props;
|
||||
props[boost::mqtt5::prop::reason_string] = "Lost connection!";
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::optional<std::string> reason_string = props[async_mqtt5::prop::reason_string];
|
||||
std::optional<std::string> reason_string = props[boost::mqtt5::prop::reason_string];
|
||||
if (reason_string.has_value())
|
||||
// reason string property was previously set
|
||||
else
|
||||
// reason string property was not set
|
||||
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -19,32 +19,32 @@ This section lists all possible __PUBACK__ Properties and describes their usage:
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::puback_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::puback_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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 `std::vector<std::pair<std::string, std::string>>`.]
|
||||
except for `boost::mqtt5::prop::user_property`, where it will return an instance of `std::vector<std::pair<std::string, std::string>>`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::puback_props props;
|
||||
props[async_mqtt5::prop::reason_string] = "Some reason...";
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::puback_props props;
|
||||
props[boost::mqtt5::prop::reason_string] = "Some reason...";
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::optional<std::string> reason_string = props[async_mqtt5::prop::reason_string];
|
||||
std::optional<std::string> reason_string = props[boost::mqtt5::prop::reason_string];
|
||||
if (reason_string.has_value())
|
||||
// reason string property was previously set
|
||||
else
|
||||
// reason string property was not set
|
||||
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -19,32 +19,32 @@ This section lists all possible __PUBCOMP__ Properties and describes their usage
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::pubcomp_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::pubcomp_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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 `std::vector<std::pair<std::string, std::string>>`.]
|
||||
except for `boost::mqtt5::prop::user_property`, where it will return an instance of `std::vector<std::pair<std::string, std::string>>`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::pubcomp_props props;
|
||||
props[async_mqtt5::prop::reason_string] = "Some reason...";
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::pubcomp_props props;
|
||||
props[boost::mqtt5::prop::reason_string] = "Some reason...";
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::optional<std::string> reason_string = props[async_mqtt5::prop::reason_string];
|
||||
std::optional<std::string> reason_string = props[boost::mqtt5::prop::reason_string];
|
||||
if (reason_string.has_value())
|
||||
// reason string property was previously set
|
||||
else
|
||||
// reason string property was not set
|
||||
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -25,36 +25,36 @@ This section lists all possible __PUBLISH__ Properties and describes their usage
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::publish_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::publish_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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` and `async_mqtt5::prop::subscription_identifier`, where it will return an instance of
|
||||
`std::vector<std::pair<std::string, std::string>>` and `async_mqtt5::prop::subscription_identifiers` respectively.
|
||||
`async_mqtt5::prop::subscription_identifiers` has the interface of `boost::container::small_vector`.]
|
||||
except for `boost::mqtt5::prop::user_property` and `boost::mqtt5::prop::subscription_identifier`, where it will return an instance of
|
||||
`std::vector<std::pair<std::string, std::string>>` and `boost::mqtt5::prop::subscription_identifiers` respectively.
|
||||
`boost::mqtt5::prop::subscription_identifiers` has the interface of `boost::container::small_vector`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::publish_props props;
|
||||
props[async_mqtt5::prop::payload_format_indicator] = uint8_t(1);
|
||||
props[async_mqtt5::prop::topic_alias] = uint16_t(12);
|
||||
props[async_mqtt5::prop::response_topic] = "response_topic";
|
||||
props[async_mqtt5::prop::subscription_identifier].push_back(40);
|
||||
boost::mqtt5::publish_props props;
|
||||
props[boost::mqtt5::prop::payload_format_indicator] = uint8_t(1);
|
||||
props[boost::mqtt5::prop::topic_alias] = uint16_t(12);
|
||||
props[boost::mqtt5::prop::response_topic] = "response_topic";
|
||||
props[boost::mqtt5::prop::subscription_identifier].push_back(40);
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::optional<uint16_t> topic_alias = props[async_mqtt5::prop::topic_alias];
|
||||
std::optional<uint16_t> topic_alias = props[boost::mqtt5::prop::topic_alias];
|
||||
if (topic_alias.has_value())
|
||||
// topic alias property was previously set
|
||||
else
|
||||
// topic alias property was not set
|
||||
|
||||
async_mqtt5::prop::subscription_identifiers& sub_ids = props[async_mqtt5::prop::subscription_identifier];
|
||||
boost::mqtt5::prop::subscription_identifiers& sub_ids = props[boost::mqtt5::prop::subscription_identifier];
|
||||
if (!sub_ids.empty())
|
||||
// subscription identifier property was previously set
|
||||
else
|
||||
|
@ -19,32 +19,32 @@ This section lists all possible __PUBREC__ Properties and describes their usage:
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::pubrec_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::pubrec_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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 `std::vector<std::pair<std::string, std::string>>`.]
|
||||
except for `boost::mqtt5::prop::user_property`, where it will return an instance of `std::vector<std::pair<std::string, std::string>>`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::pubrec_props props;
|
||||
props[async_mqtt5::prop::reason_string] = "Some reason...";
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::pubrec_props props;
|
||||
props[boost::mqtt5::prop::reason_string] = "Some reason...";
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::optional<std::string> reason_string = props[async_mqtt5::prop::reason_string];
|
||||
std::optional<std::string> reason_string = props[boost::mqtt5::prop::reason_string];
|
||||
if (reason_string.has_value())
|
||||
// reason string property was previously set
|
||||
else
|
||||
// reason string property was not set
|
||||
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -19,31 +19,31 @@ This section lists all possible __PUBREL__ Properties and describes their usage:
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::pubrel_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::pubrel_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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 `std::vector<std::pair<std::string, std::string>>`.]
|
||||
except for `boost::mqtt5::prop::user_property`, where it will return an instance of `std::vector<std::pair<std::string, std::string>>`.]
|
||||
|
||||
[h4 Example]
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::pubrel_props props;
|
||||
props[async_mqtt5::prop::reason_string] = "Some reason...";
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::pubrel_props props;
|
||||
props[boost::mqtt5::prop::reason_string] = "Some reason...";
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::optional<std::string> reason_string = props[async_mqtt5::prop::reason_string];
|
||||
std::optional<std::string> reason_string = props[boost::mqtt5::prop::reason_string];
|
||||
if (reason_string.has_value())
|
||||
// reason string property was previously set
|
||||
else
|
||||
// reason string property was not set
|
||||
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -19,32 +19,32 @@ This section lists all possible __SUBACK__ Properties and describes their usage:
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::suback_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::suback_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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 `std::vector<std::pair<std::string, std::string>>`.]
|
||||
except for `boost::mqtt5::prop::user_property`, where it will return an instance of `std::vector<std::pair<std::string, std::string>>`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::suback_props props;
|
||||
props[async_mqtt5::prop::reason_string] = "Some reason...";
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::suback_props props;
|
||||
props[boost::mqtt5::prop::reason_string] = "Some reason...";
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::optional<std::string> reason_string = props[async_mqtt5::prop::reason_string];
|
||||
std::optional<std::string> reason_string = props[boost::mqtt5::prop::reason_string];
|
||||
if (reason_string.has_value())
|
||||
// reason string property was previously set
|
||||
else
|
||||
// reason string property was not set
|
||||
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -20,34 +20,34 @@ This section lists all possible __SUBSCRIBE__ Properties and describes their usa
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::subscribe_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::subscribe_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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` and `async_mqtt5::prop::subscription_identifier`, where it will return an instance of
|
||||
`std::vector<std::pair<std::string, std::string>>` and `async_mqtt5::prop::subscription_identifiers` respectively.
|
||||
`async_mqtt5::prop::subscription_identifiers` has the interface of `std::optional<int32_t>`.]
|
||||
except for `boost::mqtt5::prop::user_property` and `boost::mqtt5::prop::subscription_identifier`, where it will return an instance of
|
||||
`std::vector<std::pair<std::string, std::string>>` and `boost::mqtt5::prop::subscription_identifiers` respectively.
|
||||
`boost::mqtt5::prop::subscription_identifiers` has the interface of `std::optional<int32_t>`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::subscribe_props props;
|
||||
props[async_mqtt5::prop::subscription_identifier] = 1234;
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::subscribe_props props;
|
||||
props[boost::mqtt5::prop::subscription_identifier] = 1234;
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::prop::subscription_identifiers sub_id = props[async_mqtt5::prop::subscription_identifier];
|
||||
boost::mqtt5::prop::subscription_identifiers sub_id = props[boost::mqtt5::prop::subscription_identifier];
|
||||
if (sub_id.has_value())
|
||||
// subscription identifier property was previously set
|
||||
else
|
||||
// subscription identifier property was not set
|
||||
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -19,32 +19,32 @@ This section lists all possible __UNSUBACK__ Properties and describes their usag
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::unsuback_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::unsuback_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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 `std::vector<std::pair<std::string, std::string>>`.]
|
||||
except for `boost::mqtt5::prop::user_property`, where it will return an instance of `std::vector<std::pair<std::string, std::string>>`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::unsuback_props props;
|
||||
props[async_mqtt5::prop::reason_string] = "Some reason...";
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::unsuback_props props;
|
||||
props[boost::mqtt5::prop::reason_string] = "Some reason...";
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::optional<std::string> reason_string = props[async_mqtt5::prop::reason_string];
|
||||
std::optional<std::string> reason_string = props[boost::mqtt5::prop::reason_string];
|
||||
if (reason_string.has_value())
|
||||
// reason string property was previously set
|
||||
else
|
||||
// reason string property was not set
|
||||
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -19,25 +19,25 @@ This section lists all possible __UNSUBSCRIBE__ Properties and describes their u
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After obtaining an instance of `async_mqtt5::unsubscribe_props`, the subscript operator can be used to access a Property.
|
||||
After obtaining an instance of `boost::mqtt5::unsubscribe_props`, the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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 `std::vector<std::pair<std::string, std::string>>`.]
|
||||
except for `boost::mqtt5::prop::user_property`, where it will return an instance of `std::vector<std::pair<std::string, std::string>>`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::unsubscribe_props props;
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::unsubscribe_props props;
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -25,33 +25,33 @@ This section lists all possible [reflink2 will Will] Properties and describes th
|
||||
]
|
||||
|
||||
[h4 Usage]
|
||||
After creating an instance of [reflink2 will `async_mqtt5::will`], the subscript operator can be used to access a Property.
|
||||
After creating an instance of [reflink2 will `boost::mqtt5::will`], the subscript operator can be used to access a Property.
|
||||
|
||||
The Identifiers listed in the table above are available within the `async_mqtt5::prop` namespace for Property access.
|
||||
The Identifiers listed in the table above are available within the `boost::mqtt5::prop` namespace for Property access.
|
||||
|
||||
[note When accessing 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 `std::vector<std::pair<std::string, std::string>>`.]
|
||||
except for `boost::mqtt5::prop::user_property`, where it will return an instance of `std::vector<std::pair<std::string, std::string>>`.]
|
||||
|
||||
[h4 Example]
|
||||
|
||||
The following example shows how to set a Property value:
|
||||
|
||||
[!c++]
|
||||
async_mqtt5::will will;
|
||||
will[async_mqtt5::prop::message_expiry_interval] = 90;
|
||||
will[async_mqtt5::prop::content_type] = "Notification";
|
||||
props[async_mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
boost::mqtt5::will will;
|
||||
will[boost::mqtt5::prop::message_expiry_interval] = 90;
|
||||
will[boost::mqtt5::prop::content_type] = "Notification";
|
||||
props[boost::mqtt5::prop::user_property].emplace_back("name", "value");
|
||||
|
||||
The following example shows how to retrieve a Property value:
|
||||
|
||||
[!c++]
|
||||
std::optional<std::string> c_type = will[async_mqtt5::prop::content_type];
|
||||
std::optional<std::string> c_type = will[boost::mqtt5::prop::content_type];
|
||||
if (c_type.has_value())
|
||||
// content type property was previously set
|
||||
else
|
||||
// content type property was not set
|
||||
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[async_mqtt5::prop::user_property];
|
||||
std::vector<std::pair<std::string, std::string>>& user_props = props[boost::mqtt5::prop::user_property];
|
||||
if (!user_props.empty())
|
||||
// user property was previously set
|
||||
else
|
||||
|
@ -14,70 +14,65 @@
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Classes</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="async_mqtt5.ref.authority_path">authority_path</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.mqtt_client">mqtt_client</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_code">reason_code</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.subscribe_options">subscribe_options</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.subscribe_topic">subscribe_topic</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.will">will</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__authority_path">authority_path</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__mqtt_client">mqtt_client</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_code">reason_code</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__subscribe_options">subscribe_options</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__subscribe_topic">subscribe_topic</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__will">will</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Concepts</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="async_mqtt5.ref.ExecutionContext">ExecutionContext</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.StreamType">StreamType</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.TlsContext">TlsContext</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.is_authenticator">is_authenticator</link></member>
|
||||
<member><link linkend="mqtt5.ref.ExecutionContext">ExecutionContext</link></member>
|
||||
<member><link linkend="mqtt5.ref.StreamType">StreamType</link></member>
|
||||
<member><link linkend="mqtt5.ref.TlsContext">TlsContext</link></member>
|
||||
<member><link linkend="mqtt5.ref.is_authenticator">is_authenticator</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Type aliases</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="async_mqtt5.ref.error_code">error_code</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__error_code">error_code</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Enumerations</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="async_mqtt5.ref.auth_step_e">auth_step_e</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.client.error">client::error</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.disconnect_rc_e">disconnect_rc_e</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.qos_e">qos_e</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.retain_e">retain_e</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Functions</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="async_mqtt5.ref.client.get_error_code_category">get_error_code_category</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.client.make_error_code">make_error_code</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__auth_step_e">auth_step_e</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__client__error">client::error</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__disconnect_rc_e">disconnect_rc_e</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__qos_e">qos_e</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__retain_e">retain_e</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Properties</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="async_mqtt5.ref.will_props">will_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.connect_props">connect_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.connack_props">connack_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.publish_props">publish_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.puback_props">puback_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.pubrec_props">pubrec_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.pubrel_props">pubrel_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.pubcomp_props">pubcomp_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.subscribe_props">subscribe_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.suback_props">suback_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.unsubscribe_props">unsubscribe_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.unsuback_props">unsuback_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.disconnect_props">disconnect_props</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.auth_props">auth_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.will_props">will_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.connect_props">connect_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.connack_props">connack_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.publish_props">publish_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.puback_props">puback_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.pubrec_props">pubrec_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.pubrel_props">pubrel_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.pubcomp_props">pubcomp_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.subscribe_props">subscribe_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.suback_props">suback_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.unsubscribe_props">unsubscribe_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.unsuback_props">unsuback_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.disconnect_props">disconnect_props</link></member>
|
||||
<member><link linkend="mqtt5.ref.auth_props">auth_props</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Reference tables</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="async_mqtt5.ref.Reason_codes">Reason codes</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.Error_handling">Error handling</link></member>
|
||||
<member><link linkend="mqtt5.ref.Reason_codes">Reason codes</link></member>
|
||||
<member><link linkend="mqtt5.ref.Error_handling">Error handling</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Logging</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="async_mqtt5.ref.LoggerType">LoggerType</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.logger">logger</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.log_level">log_level</link></member>
|
||||
<member><link linkend="mqtt5.ref.LoggerType">LoggerType</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__logger">logger</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__log_level">log_level</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
</row></tbody>
|
||||
|
@ -14,59 +14,59 @@
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Success</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.continue_authentication">continue_authentication</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.disconnect_with_will_message">disconnect_with_will_message</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.granted_qos_0">granted_qos_0</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.granted_qos_1">granted_qos_1</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.granted_qos_2">granted_qos_2</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.no_matching_subscribers">no_matching_subscribers</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.no_subscription_existed">no_subscription_existed</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.normal_disconnection">normal_disconnection</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.reauthenticate">reauthenticate</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.success">success</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__continue_authentication">continue_authentication</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__disconnect_with_will_message">disconnect_with_will_message</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__granted_qos_0">granted_qos_0</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__granted_qos_1">granted_qos_1</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__granted_qos_2">granted_qos_2</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__no_matching_subscribers">no_matching_subscribers</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__no_subscription_existed">no_subscription_existed</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__normal_disconnection">normal_disconnection</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__reauthenticate">reauthenticate</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__success">success</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Error</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.administrative_action">administrative_action</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.bad_authentication_method">bad_authentication_method</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.bad_username_or_password">bad_username_or_password</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.banned">banned</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.client_identifier_not_valid">client_identifier_not_valid</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.connection_rate_exceeded">connection_rate_exceeded</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.implementation_specific_error">implementation_specific_error</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.keep_alive_timeout">keep_alive_timeout</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.maximum_connect_time">maximum_connect_time</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.message_rate_too_high">message_rate_too_high</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.not_authorized">not_authorized</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.packet_identifier_in_use">packet_identifier_in_use</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.packet_identifier_not_found">packet_identifier_not_found</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.packet_too_large">packet_too_large</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.payload_format_invalid">payload_format_invalid</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.qos_not_supported">qos_not_supported</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.quota_exceeded">quota_exceeded</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.receive_maximum_exceeded">receive_maximum_exceeded</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.retain_not_supported">retain_not_supported</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.server_busy">server_busy</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.server_moved">server_moved</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.server_shutting_down">server_shutting_down</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.server_unavailable">server_unavailable</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.session_taken_over">session_taken_over</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.shared_subscriptions_not_supported">shared_subscriptions_not_supported</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.subscription_ids_not_supported">subscription_ids_not_supported</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.topic_alias_invalid">topic_alias_invalid</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.topic_filter_invalid">topic_filter_invalid</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.topic_name_invalid">topic_name_invalid</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.unsupported_protocol_version">unsupported_protocol_version</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.use_another_server">use_another_server</link></member>
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.wildcard_subscriptions_not_supported">wildcard_subscriptions_not_supported</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__administrative_action">administrative_action</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__bad_authentication_method">bad_authentication_method</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__bad_username_or_password">bad_username_or_password</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__banned">banned</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__client_identifier_not_valid">client_identifier_not_valid</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__connection_rate_exceeded">connection_rate_exceeded</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__implementation_specific_error">implementation_specific_error</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__keep_alive_timeout">keep_alive_timeout</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__maximum_connect_time">maximum_connect_time</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__message_rate_too_high">message_rate_too_high</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__not_authorized">not_authorized</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__packet_identifier_in_use">packet_identifier_in_use</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__packet_identifier_not_found">packet_identifier_not_found</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__packet_too_large">packet_too_large</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__payload_format_invalid">payload_format_invalid</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__qos_not_supported">qos_not_supported</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__quota_exceeded">quota_exceeded</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__receive_maximum_exceeded">receive_maximum_exceeded</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__retain_not_supported">retain_not_supported</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__server_busy">server_busy</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__server_moved">server_moved</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__server_shutting_down">server_shutting_down</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__server_unavailable">server_unavailable</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__session_taken_over">session_taken_over</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__shared_subscriptions_not_supported">shared_subscriptions_not_supported</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__subscription_ids_not_supported">subscription_ids_not_supported</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__topic_alias_invalid">topic_alias_invalid</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__topic_filter_invalid">topic_filter_invalid</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__topic_name_invalid">topic_name_invalid</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__unsupported_protocol_version">unsupported_protocol_version</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__use_another_server">use_another_server</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__wildcard_subscriptions_not_supported">wildcard_subscriptions_not_supported</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Special</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="async_mqtt5.ref.reason_codes.empty">empty</link></member>
|
||||
<member><link linkend="mqtt5.ref.boost__mqtt5__reason_codes__empty">empty</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
</row></tbody>
|
||||
|
@ -1,214 +0,0 @@
|
||||
# Doxyfile 1.9.8
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Project related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
PROJECT_NAME = "async_mqtt5 reference"
|
||||
PROJECT_NUMBER =
|
||||
OUTPUT_DIRECTORY = ./bin
|
||||
CREATE_SUBDIRS = NO
|
||||
OUTPUT_LANGUAGE = English
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
REPEAT_BRIEF = YES
|
||||
ABBREVIATE_BRIEF =
|
||||
ALWAYS_DETAILED_SEC = YES
|
||||
INLINE_INHERITED_MEMB = YES
|
||||
FULL_PATH_NAMES = YES
|
||||
STRIP_FROM_PATH = ./../../../
|
||||
STRIP_FROM_INC_PATH =
|
||||
SHORT_NAMES = NO
|
||||
JAVADOC_AUTOBRIEF = NO
|
||||
MULTILINE_CPP_IS_BRIEF = YES
|
||||
INHERIT_DOCS = NO
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
TAB_SIZE = 2
|
||||
ALIASES =
|
||||
OPTIMIZE_OUTPUT_FOR_C = NO
|
||||
OPTIMIZE_OUTPUT_JAVA = NO
|
||||
BUILTIN_STL_SUPPORT = NO
|
||||
DISTRIBUTE_GROUP_DOC = NO
|
||||
SUBGROUPING = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
EXTRACT_ALL = YES
|
||||
EXTRACT_PRIVATE = NO
|
||||
EXTRACT_STATIC = YES
|
||||
EXTRACT_LOCAL_CLASSES = NO
|
||||
EXTRACT_LOCAL_METHODS = NO
|
||||
HIDE_UNDOC_MEMBERS = YES
|
||||
HIDE_UNDOC_CLASSES = YES
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = NO
|
||||
CASE_SENSE_NAMES = YES
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
SHOW_INCLUDE_FILES = NO
|
||||
INLINE_INFO = NO
|
||||
SORT_MEMBER_DOCS = NO
|
||||
SORT_BRIEF_DOCS = NO
|
||||
SORT_BY_SCOPE_NAME = NO
|
||||
GENERATE_TODOLIST = NO
|
||||
GENERATE_TESTLIST = NO
|
||||
GENERATE_BUGLIST = NO
|
||||
GENERATE_DEPRECATEDLIST= NO
|
||||
ENABLED_SECTIONS =
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
SHOW_USED_FILES = NO
|
||||
FILE_VERSION_FILTER =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to warning and progress messages
|
||||
#---------------------------------------------------------------------------
|
||||
QUIET = NO
|
||||
WARNINGS = YES
|
||||
WARN_IF_UNDOCUMENTED = YES
|
||||
WARN_IF_DOC_ERROR = YES
|
||||
WARN_NO_PARAMDOC = NO
|
||||
WARN_FORMAT = "$file:$line: $text"
|
||||
WARN_LOGFILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the input files
|
||||
#---------------------------------------------------------------------------
|
||||
INPUT = ../include/async_mqtt5/error.hpp \
|
||||
../include/async_mqtt5/logger.hpp \
|
||||
../include/async_mqtt5/reason_codes.hpp \
|
||||
../include/async_mqtt5/types.hpp \
|
||||
../include/async_mqtt5/mqtt_client.hpp
|
||||
FILE_PATTERNS =
|
||||
RECURSIVE = NO
|
||||
EXCLUDE =
|
||||
EXCLUDE_SYMLINKS = NO
|
||||
EXCLUDE_PATTERNS =
|
||||
EXAMPLE_PATH =
|
||||
EXAMPLE_PATTERNS =
|
||||
EXAMPLE_RECURSIVE = YES
|
||||
IMAGE_PATH =
|
||||
INPUT_FILTER =
|
||||
FILTER_PATTERNS =
|
||||
FILTER_SOURCE_FILES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to source browsing
|
||||
#---------------------------------------------------------------------------
|
||||
SOURCE_BROWSER = NO
|
||||
INLINE_SOURCES = NO
|
||||
STRIP_CODE_COMMENTS = YES
|
||||
REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = NO
|
||||
USE_HTAGS = NO
|
||||
VERBATIM_HEADERS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the alphabetical class index
|
||||
#---------------------------------------------------------------------------
|
||||
ALPHABETICAL_INDEX = YES
|
||||
IGNORE_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_HTML = NO
|
||||
HTML_OUTPUT = .
|
||||
HTML_FILE_EXTENSION = .html
|
||||
HTML_HEADER =
|
||||
HTML_FOOTER =
|
||||
HTML_STYLESHEET =
|
||||
GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
HHC_LOCATION =
|
||||
GENERATE_CHI = NO
|
||||
BINARY_TOC = NO
|
||||
TOC_EXPAND = NO
|
||||
DISABLE_INDEX = YES
|
||||
ENUM_VALUES_PER_LINE = 1
|
||||
GENERATE_TREEVIEW = NO
|
||||
TREEVIEW_WIDTH = 250
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_LATEX = NO
|
||||
LATEX_OUTPUT = latex
|
||||
LATEX_CMD_NAME = latex
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
COMPACT_LATEX = NO
|
||||
EXTRA_PACKAGES =
|
||||
LATEX_HEADER =
|
||||
PDF_HYPERLINKS = NO
|
||||
USE_PDFLATEX = NO
|
||||
LATEX_BATCHMODE = NO
|
||||
LATEX_HIDE_INDICES = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_RTF = NO
|
||||
RTF_OUTPUT = rtf
|
||||
COMPACT_RTF = NO
|
||||
RTF_HYPERLINKS = NO
|
||||
RTF_STYLESHEET_FILE =
|
||||
RTF_EXTENSIONS_FILE =
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_MAN = NO
|
||||
MAN_OUTPUT = man
|
||||
MAN_EXTENSION = .3
|
||||
MAN_LINKS = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_XML = YES
|
||||
XML_OUTPUT = xml
|
||||
XML_PROGRAMLISTING = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
#---------------------------------------------------------------------------
|
||||
# configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
GENERATE_PERLMOD = NO
|
||||
PERLMOD_LATEX = NO
|
||||
PERLMOD_PRETTY = YES
|
||||
PERLMOD_MAKEVAR_PREFIX =
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
ENABLE_PREPROCESSING = YES
|
||||
MACRO_EXPANSION = YES
|
||||
EXPAND_ONLY_PREDEF = YES
|
||||
SEARCH_INCLUDES = YES
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_FILE_PATTERNS =
|
||||
PREDEFINED =
|
||||
EXPAND_AS_DEFINED =
|
||||
SKIP_FUNCTION_MACROS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to external references
|
||||
#---------------------------------------------------------------------------
|
||||
TAGFILES =
|
||||
GENERATE_TAGFILE =
|
||||
ALLEXTERNALS = NO
|
||||
EXTERNAL_GROUPS = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
HIDE_UNDOC_RELATIONS = YES
|
||||
HAVE_DOT = YES
|
||||
CLASS_GRAPH = YES
|
||||
COLLABORATION_GRAPH = NO
|
||||
GROUP_GRAPHS = NO
|
||||
UML_LOOK = NO
|
||||
TEMPLATE_RELATIONS = YES
|
||||
INCLUDE_GRAPH = NO
|
||||
INCLUDED_BY_GRAPH = NO
|
||||
CALL_GRAPH = NO
|
||||
GRAPHICAL_HIERARCHY = NO
|
||||
DIRECTORY_GRAPH = NO
|
||||
DOT_IMAGE_FORMAT = png
|
||||
DOT_PATH =
|
||||
DOTFILE_DIRS =
|
||||
MAX_DOT_GRAPH_DEPTH = 0
|
||||
DOT_MULTI_TARGETS = NO
|
||||
GENERATE_LEGEND = NO
|
||||
DOT_CLEANUP = YES
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration::additions related to the search engine
|
||||
#---------------------------------------------------------------------------
|
||||
SEARCHENGINE = NO
|
1726
doc/reference.xsl
1726
doc/reference.xsl
File diff suppressed because it is too large
Load Diff
@ -25,8 +25,6 @@
|
||||
#include <boost/asio/ip/tcp.hpp>
|
||||
#include <boost/asio/steady_timer.hpp>
|
||||
|
||||
#include <boost/mysql/any_connection.hpp>
|
||||
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
@ -23,10 +23,10 @@ namespace boost::mqtt5 {
|
||||
* in the \__DISCONNECT\__ packet as the reason for the disconnection.
|
||||
*/
|
||||
enum class disconnect_rc_e : uint8_t {
|
||||
/** Close the connection normally. Do not send the Will Message. */
|
||||
/** \brief Close the connection normally. Do not send the Will Message. */
|
||||
normal_disconnection = 0x00,
|
||||
|
||||
/** The Client wishes to disconnect but requires that
|
||||
/** \brief The Client wishes to disconnect but requires that
|
||||
the Server also publishes its Will Message. */
|
||||
disconnect_with_will_message = 0x04
|
||||
};
|
||||
@ -61,39 +61,39 @@ namespace client {
|
||||
* \details Encapsulates errors that occur on the client side.
|
||||
*/
|
||||
enum class error : int {
|
||||
/** The packet is malformed */
|
||||
/** \brief The packet is malformed */
|
||||
malformed_packet = 100,
|
||||
|
||||
/** The packet has exceeded the Maximum Packet Size the Server is willing to accept */
|
||||
/** \brief The packet has exceeded the Maximum Packet Size the Server is willing to accept */
|
||||
packet_too_large,
|
||||
|
||||
/** The Client's session does not exist or it has expired */
|
||||
/** \brief The Client's session does not exist or it has expired */
|
||||
session_expired,
|
||||
|
||||
/** There are no more available Packet Identifiers to use */
|
||||
/** \brief There are no more available Packet Identifiers to use */
|
||||
pid_overrun,
|
||||
|
||||
/** The Topic is invalid and does not conform to the specification */
|
||||
/** \brief The Topic is invalid and does not conform to the specification */
|
||||
invalid_topic,
|
||||
|
||||
// publish
|
||||
/** The Server does not support the specified \ref qos_e */
|
||||
/** \brief The Server does not support the specified \ref qos_e */
|
||||
qos_not_supported,
|
||||
|
||||
/** The Server does not support retained messages */
|
||||
/** \brief The Server does not support retained messages */
|
||||
retain_not_available,
|
||||
|
||||
/** The Client attempted to send a Topic Alias that is greater than Topic Alias Maximum */
|
||||
/** \brief The Client attempted to send a Topic Alias that is greater than Topic Alias Maximum */
|
||||
topic_alias_maximum_reached,
|
||||
|
||||
// subscribe
|
||||
/** The Server does not support Wildcard Subscriptions */
|
||||
/** \brief The Server does not support Wildcard Subscriptions */
|
||||
wildcard_subscription_not_available,
|
||||
|
||||
/** The Server does not support this Subscription Identifier */
|
||||
/** \brief The Server does not support this Subscription Identifier */
|
||||
subscription_identifier_not_available,
|
||||
|
||||
/** The Server does not support Shared Subscriptions */
|
||||
/** \brief The Server does not support Shared Subscriptions */
|
||||
shared_subscription_not_available
|
||||
};
|
||||
|
||||
|
@ -54,9 +54,9 @@ enum class log_level : uint8_t {
|
||||
* implicit strand, none of the functions will be invoked concurrently.
|
||||
*
|
||||
* \par Thread safety
|
||||
* ['Distinct objects]: unsafe. \n
|
||||
* ['Shared objects]: unsafe. \n
|
||||
* This class is [*not thread-safe].
|
||||
* Distinct objects: usafe. \n
|
||||
* Shared objects: unsafe. \n
|
||||
* This class is <b>not thread-safe</b>.
|
||||
*/
|
||||
class logger {
|
||||
constexpr static auto prefix = "[Boost.MQTT5]";
|
||||
|
@ -45,9 +45,9 @@ namespace asio = boost::asio;
|
||||
* \tparam \__LoggerType\__ Type of object used to log events within the Client.
|
||||
*
|
||||
* \par Thread safety
|
||||
* ['Distinct objects]: safe. \n
|
||||
* ['Shared objects]: unsafe. \n
|
||||
* This class is [*not thread-safe].
|
||||
* Distinct objects: safe. \n
|
||||
* Shared objects: unsafe. \n
|
||||
* This class is <b>not thread-safe</b>.
|
||||
* The application must also ensure that all asynchronous operations are performed within the same implicit or explicit strand.
|
||||
*/
|
||||
template <
|
||||
@ -150,7 +150,7 @@ public:
|
||||
/**
|
||||
* \brief Destructor.
|
||||
*
|
||||
* \details Automatically calls \ref mqtt_client::cancel.
|
||||
* \details Automatically calls \ref cancel.
|
||||
*/
|
||||
~mqtt_client() {
|
||||
if (_impl)
|
||||
@ -199,7 +199,7 @@ public:
|
||||
* \par Completion condition
|
||||
* The asynchronous operation will complete with
|
||||
* `boost::asio::error::operation_aborted` when the client is cancelled by calling
|
||||
* \ref mqtt_client::async_disconnect, \ref mqtt_client::cancel, destruction or
|
||||
* \ref async_disconnect, \ref cancel, destruction or
|
||||
* if a non-recoverable error happens during a connection attempt (e.g. access denied).
|
||||
*
|
||||
* \par Error codes
|
||||
@ -208,7 +208,7 @@ public:
|
||||
*
|
||||
* \par Per-Operation Cancellation
|
||||
* This asynchronous operation supports cancellation for the following \__CANCELLATION_TYPE\__ values:\n
|
||||
* - `cancellation_type::terminal` - invokes \ref mqtt_client::cancel \n
|
||||
* - `cancellation_type::terminal` - invokes \ref cancel \n
|
||||
*/
|
||||
template <
|
||||
typename CompletionToken =
|
||||
@ -228,7 +228,7 @@ public:
|
||||
* with `boost::asio::error::operation_aborted`.
|
||||
*
|
||||
* \attention This function has terminal effects and will close the Client.
|
||||
* The Client cannot be used before calling \ref mqtt_client::async_run again.
|
||||
* The Client cannot be used before calling \ref async_run again.
|
||||
*/
|
||||
void cancel() {
|
||||
auto impl = _impl;
|
||||
@ -387,7 +387,7 @@ public:
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Initiates [mqttlink 3901257 Re-authentication]
|
||||
* \brief Initiates \__RE_AUTHENTICATION\__
|
||||
* using the authenticator given in the \ref authenticator method.
|
||||
*
|
||||
* \note If \ref authenticator was not called, this method does nothing.
|
||||
@ -489,19 +489,19 @@ public:
|
||||
* - `boost::system::errc::errc_t::success` \n
|
||||
* - `boost::asio::error::operation_aborted` \n
|
||||
* - `boost::asio::error::no_recovery` \n
|
||||
* - \link boost::mqtt5::client::error::malformed_packet \endlink
|
||||
* - \link boost::mqtt5::client::error::packet_too_large \endlink
|
||||
* - \link boost::mqtt5::client::error::pid_overrun \endlink
|
||||
* - \link boost::mqtt5::client::error::qos_not_supported \endlink
|
||||
* - \link boost::mqtt5::client::error::retain_not_available \endlink
|
||||
* - \link boost::mqtt5::client::error::topic_alias_maximum_reached \endlink
|
||||
* - \link boost::mqtt5::client::error::invalid_topic \endlink
|
||||
* - \ref boost::mqtt5::client::error::malformed_packet
|
||||
* - \ref boost::mqtt5::client::error::packet_too_large
|
||||
* - \ref boost::mqtt5::client::error::pid_overrun
|
||||
* - \ref boost::mqtt5::client::error::qos_not_supported
|
||||
* - \ref boost::mqtt5::client::error::retain_not_available
|
||||
* - \ref boost::mqtt5::client::error::topic_alias_maximum_reached
|
||||
* - \ref boost::mqtt5::client::error::invalid_topic
|
||||
*
|
||||
* Refer to the section on \__ERROR_HANDLING\__ to find the underlying causes for each error code.
|
||||
*
|
||||
* \par Per-Operation Cancellation
|
||||
* This asynchronous operation supports cancellation for the following \__CANCELLATION_TYPE\__ values:\n
|
||||
* - `cancellation_type::terminal` - invokes \ref mqtt_client::cancel \n
|
||||
* - `cancellation_type::terminal` - invokes \ref cancel \n
|
||||
* - `cancellation_type::partial` & `cancellation_type::total` - prevents potential resending of the \__PUBLISH\__ packet \n
|
||||
*
|
||||
*/
|
||||
@ -561,13 +561,13 @@ public:
|
||||
* - `boost::system::errc::errc_t::success` \n
|
||||
* - `boost::asio::error::no_recovery` \n
|
||||
* - `boost::asio::error::operation_aborted` \n
|
||||
* - \link boost::mqtt5::client::error::malformed_packet \endlink
|
||||
* - \link boost::mqtt5::client::error::packet_too_large \endlink
|
||||
* - \link boost::mqtt5::client::error::pid_overrun \endlink
|
||||
* - \link boost::mqtt5::client::error::invalid_topic \endlink
|
||||
* - \link boost::mqtt5::client::error::wildcard_subscription_not_available \endlink
|
||||
* - \link boost::mqtt5::client::error::subscription_identifier_not_available \endlink
|
||||
* - \link boost::mqtt5::client::error::shared_subscription_not_available \endlink
|
||||
* - \ref boost::mqtt5::client::error::malformed_packet
|
||||
* - \ref boost::mqtt5::client::error::packet_too_large
|
||||
* - \ref boost::mqtt5::client::error::pid_overrun
|
||||
* - \ref boost::mqtt5::client::error::invalid_topic
|
||||
* - \ref boost::mqtt5::client::error::wildcard_subscription_not_available
|
||||
* - \ref boost::mqtt5::client::error::subscription_identifier_not_available
|
||||
* - \ref boost::mqtt5::client::error::shared_subscription_not_available
|
||||
*
|
||||
* Refer to the section on \__ERROR_HANDLING\__ to find the underlying causes for each error code.
|
||||
*
|
||||
@ -634,13 +634,13 @@ public:
|
||||
* - `boost::system::errc::errc_t::success` \n
|
||||
* - `boost::asio::error::no_recovery` \n
|
||||
* - `boost::asio::error::operation_aborted` \n
|
||||
* - \link boost::mqtt5::client::error::malformed_packet \endlink
|
||||
* - \link boost::mqtt5::client::error::packet_too_large \endlink
|
||||
* - \link boost::mqtt5::client::error::pid_overrun \endlink
|
||||
* - \link boost::mqtt5::client::error::invalid_topic \endlink
|
||||
* - \link boost::mqtt5::client::error::wildcard_subscription_not_available \endlink
|
||||
* - \link boost::mqtt5::client::error::subscription_identifier_not_available \endlink
|
||||
* - \link boost::mqtt5::client::error::shared_subscription_not_available \endlink
|
||||
* - \ref boost::mqtt5::client::error::malformed_packet
|
||||
* - \ref boost::mqtt5::client::error::packet_too_large
|
||||
* - \ref boost::mqtt5::client::error::pid_overrun
|
||||
* - \ref boost::mqtt5::client::error::invalid_topic
|
||||
* - \ref boost::mqtt5::client::error::wildcard_subscription_not_available
|
||||
* - \ref boost::mqtt5::client::error::subscription_identifier_not_available
|
||||
* - \ref boost::mqtt5::client::error::shared_subscription_not_available
|
||||
*
|
||||
* Refer to the section on \__ERROR_HANDLING\__ to find the underlying causes for each error code.
|
||||
*
|
||||
@ -703,10 +703,10 @@ public:
|
||||
* - `boost::system::errc::errc_t::success` \n
|
||||
* - `boost::asio::error::no_recovery` \n
|
||||
* - `boost::asio::error::operation_aborted` \n
|
||||
* - \link boost::mqtt5::client::error::malformed_packet \endlink
|
||||
* - \link boost::mqtt5::client::error::packet_too_large \endlink
|
||||
* - \link boost::mqtt5::client::error::pid_overrun \endlink
|
||||
* - \link boost::mqtt5::client::error::invalid_topic \endlink
|
||||
* - \ref boost::mqtt5::client::error::malformed_packet
|
||||
* - \ref boost::mqtt5::client::error::packet_too_large
|
||||
* - \ref boost::mqtt5::client::error::pid_overrun
|
||||
* - \ref boost::mqtt5::client::error::invalid_topic
|
||||
*
|
||||
* Refer to the section on \__ERROR_HANDLING\__ to find the underlying causes for each error code.
|
||||
*
|
||||
@ -771,10 +771,10 @@ public:
|
||||
* - `boost::system::errc::errc_t::success` \n
|
||||
* - `boost::asio::error::no_recovery` \n
|
||||
* - `boost::asio::error::operation_aborted` \n
|
||||
* - \link boost::mqtt5::client::error::malformed_packet \endlink
|
||||
* - \link boost::mqtt5::client::error::packet_too_large \endlink
|
||||
* - \link boost::mqtt5::client::error::pid_overrun \endlink
|
||||
* - \link boost::mqtt5::client::error::invalid_topic \endlink
|
||||
* - \ref boost::mqtt5::client::error::malformed_packet
|
||||
* - \ref boost::mqtt5::client::error::packet_too_large
|
||||
* - \ref boost::mqtt5::client::error::pid_overrun
|
||||
* - \ref boost::mqtt5::client::error::invalid_topic
|
||||
*
|
||||
* Refer to the section on \__ERROR_HANDLING\__ to find the underlying causes for each error code.
|
||||
*
|
||||
@ -837,7 +837,7 @@ public:
|
||||
* The list of all possible error codes that this operation can finish with:\n
|
||||
* - `boost::system::errc::errc_t::success`\n
|
||||
* - `boost::asio::error::operation_aborted`\n
|
||||
* - \link boost::mqtt5::client::error::session_expired \endlink
|
||||
* - \ref boost::mqtt5::client::error::session_expired
|
||||
*
|
||||
* Refer to the section on \__ERROR_HANDLING\__ to find the underlying causes for each error code.
|
||||
*
|
||||
@ -894,7 +894,7 @@ public:
|
||||
This error code can appear if the Client fails to send the \__DISCONNECT\__ packet to the Server.
|
||||
Regardless, the connection to the Server is terminated, and the Client is cancelled.
|
||||
]\n
|
||||
* - \link boost::mqtt5::client::error::malformed_packet \endlink
|
||||
* - \ref boost::mqtt5::client::error::malformed_packet
|
||||
*
|
||||
* Refer to the section on \__ERROR_HANDLING\__ to find the underlying causes for each error code.
|
||||
*
|
||||
@ -956,7 +956,7 @@ public:
|
||||
This error code can appear if the Client fails to send the \__DISCONNECT\__ packet to the Server.
|
||||
Regardless, the connection to the Server is terminated, and the Client is cancelled.
|
||||
]\n
|
||||
* - \link boost::mqtt5::client::error::malformed_packet \endlink
|
||||
* - \ref boost::mqtt5::client::error::malformed_packet
|
||||
*
|
||||
* Refer to the section on \__ERROR_HANDLING\__ to find the underlying causes for each error code.
|
||||
*
|
||||
|
@ -204,150 +204,150 @@ public:
|
||||
|
||||
namespace reason_codes {
|
||||
|
||||
/** No Reason Code. A \ref client::error occurred.*/
|
||||
/** \brief No Reason Code. A \ref client::error occurred.*/
|
||||
constexpr reason_code empty {};
|
||||
|
||||
/** The operation completed successfully. */
|
||||
/** \brief The operation completed successfully. */
|
||||
constexpr reason_code success { 0x00 };
|
||||
|
||||
/** Close the connection normally. Do not send the Will Message. */
|
||||
/** \brief Close the connection normally. Do not send the Will Message. */
|
||||
constexpr reason_code normal_disconnection { 0x00, category::disconnect };
|
||||
|
||||
/** The subscription is accepted with maximum QoS sent at 0. */
|
||||
/** \brief The subscription is accepted with maximum QoS sent at 0. */
|
||||
constexpr reason_code granted_qos_0 { 0x00, category::suback };
|
||||
|
||||
/** The subscription is accepted with maximum QoS sent at 1. */
|
||||
/** \brief The subscription is accepted with maximum QoS sent at 1. */
|
||||
constexpr reason_code granted_qos_1 { 0x01 };
|
||||
|
||||
/** The subscription is accepted with maximum QoS sent at 2 */
|
||||
/** \brief The subscription is accepted with maximum QoS sent at 2 */
|
||||
constexpr reason_code granted_qos_2 { 0x02 };
|
||||
|
||||
/** The Client wishes to disconnect but requires that
|
||||
/** \brief The Client wishes to disconnect but requires that
|
||||
the Server also publishes its Will Message. */
|
||||
constexpr reason_code disconnect_with_will_message { 0x04 };
|
||||
|
||||
/** The message is accepted but there are no subscribers. */
|
||||
/** \brief The message is accepted but there are no subscribers. */
|
||||
constexpr reason_code no_matching_subscribers { 0x10 };
|
||||
|
||||
/** No matching Topic Filter is being used by the Client. */
|
||||
/** \brief No matching Topic Filter is being used by the Client. */
|
||||
constexpr reason_code no_subscription_existed { 0x11 };
|
||||
|
||||
/** Continue the authentication with another step. */
|
||||
/** \brief Continue the authentication with another step. */
|
||||
constexpr reason_code continue_authentication { 0x18 };
|
||||
|
||||
/** Initiate a re-authentication. */
|
||||
/** \brief Initiate a re-authentication. */
|
||||
constexpr reason_code reauthenticate { 0x19 };
|
||||
|
||||
/** The Server does not wish to reveal the reason for the
|
||||
/** \brief The Server does not wish to reveal the reason for the
|
||||
failure or none of the other Reason Codes apply. */
|
||||
constexpr reason_code unspecified_error { 0x80 };
|
||||
|
||||
/** Data within the packet could not be correctly parsed. */
|
||||
/** \brief Data within the packet could not be correctly parsed. */
|
||||
constexpr reason_code malformed_packet { 0x81 };
|
||||
|
||||
/** Data in the packet does not conform to this specification. */
|
||||
/** \brief Data in the packet does not conform to this specification. */
|
||||
constexpr reason_code protocol_error { 0x82 };
|
||||
|
||||
/** The packet is valid but not accepted by this Server. */
|
||||
/** \brief The packet is valid but not accepted by this Server. */
|
||||
constexpr reason_code implementation_specific_error { 0x83 };
|
||||
|
||||
/** The Server does not support the requested version of the MQTT protocol. */
|
||||
/** \brief The Server does not support the requested version of the MQTT protocol. */
|
||||
constexpr reason_code unsupported_protocol_version { 0x84 };
|
||||
|
||||
/** The Client ID is valid but not allowed by this Server. */
|
||||
/** \brief The Client ID is valid but not allowed by this Server. */
|
||||
constexpr reason_code client_identifier_not_valid { 0x85 };
|
||||
|
||||
/** The Server does not accept the User Name or Password provided. */
|
||||
/** \brief The Server does not accept the User Name or Password provided. */
|
||||
constexpr reason_code bad_username_or_password { 0x86 };
|
||||
|
||||
/** The request is not authorized. */
|
||||
/** \brief The request is not authorized. */
|
||||
constexpr reason_code not_authorized { 0x87 };
|
||||
|
||||
/** The MQTT Server is not available. */
|
||||
/** \brief The MQTT Server is not available. */
|
||||
constexpr reason_code server_unavailable { 0x88 };
|
||||
|
||||
/** The MQTT Server is busy, try again later. */
|
||||
/** \brief The MQTT Server is busy, try again later. */
|
||||
constexpr reason_code server_busy { 0x89 };
|
||||
|
||||
/** The Client has been banned by administrative action. */
|
||||
/** \brief The Client has been banned by administrative action. */
|
||||
constexpr reason_code banned { 0x8a };
|
||||
|
||||
/** The Server is shutting down. */
|
||||
/** \brief The Server is shutting down. */
|
||||
constexpr reason_code server_shutting_down { 0x8b };
|
||||
|
||||
/** The authentication method is not supported or
|
||||
/** \brief The authentication method is not supported or
|
||||
does not match the method currently in use. */
|
||||
constexpr reason_code bad_authentication_method { 0x8c };
|
||||
|
||||
/** No packet has been received for 1.5 times the Keepalive time. */
|
||||
/** \brief No packet has been received for 1.5 times the Keepalive time. */
|
||||
constexpr reason_code keep_alive_timeout { 0x8d };
|
||||
|
||||
/** Another Connection using the same ClientID has connected
|
||||
/** \brief Another Connection using the same ClientID has connected
|
||||
causing this Connection to be closed. */
|
||||
constexpr reason_code session_taken_over { 0x8e };
|
||||
|
||||
/** The Topic Filter is not malformed, but it is not accepted. */
|
||||
/** \brief The Topic Filter is not malformed, but it is not accepted. */
|
||||
constexpr reason_code topic_filter_invalid { 0x8f };
|
||||
|
||||
/** The Topic Name is not malformed, but it is not accepted. */
|
||||
/** \brief The Topic Name is not malformed, but it is not accepted. */
|
||||
constexpr reason_code topic_name_invalid { 0x90 };
|
||||
|
||||
/** The Packet Identifier is already in use. */
|
||||
/** \brief The Packet Identifier is already in use. */
|
||||
constexpr reason_code packet_identifier_in_use { 0x91 };
|
||||
|
||||
/** The Packet Identifier is not known. */
|
||||
/** \brief The Packet Identifier is not known. */
|
||||
constexpr reason_code packet_identifier_not_found { 0x92 };
|
||||
|
||||
/** The Client or Server has received more than the Receive
|
||||
/** \brief The Client or Server has received more than the Receive
|
||||
Maximum publication for which it has not sent PUBACK or PUBCOMP. */
|
||||
constexpr reason_code receive_maximum_exceeded { 0x93 };
|
||||
|
||||
/** The Client or Server received a PUBLISH packet containing
|
||||
/** \brief The Client or Server received a PUBLISH packet containing
|
||||
a Topic Alias greater than the Maximum Topic Alias. */
|
||||
constexpr reason_code topic_alias_invalid { 0x94 };
|
||||
|
||||
/** The packet exceeded the maximum permissible size. */
|
||||
/** \brief The packet exceeded the maximum permissible size. */
|
||||
constexpr reason_code packet_too_large { 0x95 };
|
||||
|
||||
/** The received data rate is too high. */
|
||||
/** \brief The received data rate is too high. */
|
||||
constexpr reason_code message_rate_too_high { 0x96 };
|
||||
|
||||
/** An implementation or administrative imposed limit has been exceeded. */
|
||||
/** \brief An implementation or administrative imposed limit has been exceeded. */
|
||||
constexpr reason_code quota_exceeded { 0x97 };
|
||||
|
||||
/** The Connection is closed due to an administrative action. */
|
||||
/** \brief The Connection is closed due to an administrative action. */
|
||||
constexpr reason_code administrative_action { 0x98 };
|
||||
|
||||
/** The Payload does not match the specified Payload Format Indicator. */
|
||||
/** \brief The Payload does not match the specified Payload Format Indicator. */
|
||||
constexpr reason_code payload_format_invalid { 0x99 };
|
||||
|
||||
/** The Server does not support retained messages. */
|
||||
/** \brief The Server does not support retained messages. */
|
||||
constexpr reason_code retain_not_supported { 0x9a };
|
||||
|
||||
/** The Server does not support the QoS the Client specified or
|
||||
/** \brief The Server does not support the QoS the Client specified or
|
||||
it is greater than the Maximum QoS specified. */
|
||||
constexpr reason_code qos_not_supported { 0x9b };
|
||||
|
||||
/** The Client should temporarily use another server. */
|
||||
/** \brief The Client should temporarily use another server. */
|
||||
constexpr reason_code use_another_server { 0x9c };
|
||||
|
||||
/** The Client should permanently use another server. */
|
||||
/** \brief The Client should permanently use another server. */
|
||||
constexpr reason_code server_moved { 0x9d };
|
||||
|
||||
/** The Server does not support Shared Subscriptions for this Client. */
|
||||
/** \brief The Server does not support Shared Subscriptions for this Client. */
|
||||
constexpr reason_code shared_subscriptions_not_supported { 0x9e };
|
||||
|
||||
/** The connection rate limit has been exceeded. */
|
||||
/** \brief The connection rate limit has been exceeded. */
|
||||
constexpr reason_code connection_rate_exceeded { 0x9f };
|
||||
|
||||
/** The maximum connection time authorized for this
|
||||
/** \brief The maximum connection time authorized for this
|
||||
connection has been exceeded. */
|
||||
constexpr reason_code maximum_connect_time { 0xa0 };
|
||||
|
||||
/** The Server does not support Subscription Identifiers. */
|
||||
/** \brief The Server does not support Subscription Identifiers. */
|
||||
constexpr reason_code subscription_ids_not_supported { 0xa1 };
|
||||
|
||||
/** The Server does not support Wildcard Subscriptions. */
|
||||
/** \brief The Server does not support Wildcard Subscriptions. */
|
||||
constexpr reason_code wildcard_subscriptions_not_supported { 0xa2 };
|
||||
|
||||
namespace detail {
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
namespace boost::mqtt5 {
|
||||
|
||||
/** An alias for `boost::system::error_code`. */
|
||||
/// An alias for `boost::system::error_code`.
|
||||
using error_code = boost::system::error_code;
|
||||
|
||||
/**
|
||||
@ -25,13 +25,13 @@ using error_code = boost::system::error_code;
|
||||
* such as the hostname, port, and path.
|
||||
*/
|
||||
struct authority_path {
|
||||
/** The hostname of the authority as a domain name or an IP address. */
|
||||
/** \brief The hostname of the authority as a domain name or an IP address. */
|
||||
std::string host;
|
||||
|
||||
/** The port number used for communication. */
|
||||
/** \brief The port number used for communication. */
|
||||
std::string port;
|
||||
|
||||
/** Specifies the endpoint path relevant to WebSocket connections. */
|
||||
/** \brief Specifies the endpoint path relevant to WebSocket connections. */
|
||||
std::string path;
|
||||
};
|
||||
|
||||
@ -43,13 +43,13 @@ struct authority_path {
|
||||
* from the sender to the receiver.
|
||||
*/
|
||||
enum class qos_e : std::uint8_t {
|
||||
/** The message arrives at the receiver either once or not at all. */
|
||||
/** \brief The message arrives at the receiver either once or not at all. */
|
||||
at_most_once = 0b00,
|
||||
|
||||
/** Ensures the message arrives at the receiver at least once. */
|
||||
/** \brief Ensures the message arrives at the receiver at least once. */
|
||||
at_least_once = 0b01,
|
||||
|
||||
/** All messages arrive at the receiver exactly once without
|
||||
/** \brief All messages arrive at the receiver exactly once without
|
||||
loss or duplication of the messages. */
|
||||
exactly_once = 0b10
|
||||
};
|
||||
@ -61,16 +61,15 @@ enum class qos_e : std::uint8_t {
|
||||
* store the current message.
|
||||
*/
|
||||
enum class retain_e : std::uint8_t {
|
||||
/** The Server will replace any existing retained message for this Topic
|
||||
/** \brief The Server will replace any existing retained message for this Topic
|
||||
with this message. */
|
||||
yes = 0b1,
|
||||
|
||||
/** The Server will not store this message and will not remove or replace
|
||||
/** \brief The Server will not store this message and will not remove or replace
|
||||
any existing retained message. */
|
||||
no = 0b0
|
||||
};
|
||||
|
||||
|
||||
enum class dup_e : std::uint8_t {
|
||||
yes = 0b1, no = 0b0
|
||||
};
|
||||
@ -79,15 +78,15 @@ enum class dup_e : std::uint8_t {
|
||||
* \brief Represents the stage of \__ENHANCED_AUTH\__ process.
|
||||
*/
|
||||
enum class auth_step_e {
|
||||
/** The Client needs to send initial authentication data. */
|
||||
/** \brief The Client needs to send initial authentication data. */
|
||||
client_initial,
|
||||
|
||||
/** Server responded with reason_codes.continue_authentication and possibly
|
||||
/** \brief Server responded with reason_codes.continue_authentication and possibly
|
||||
* authentication data, the Client needs to send further authentication data.
|
||||
*/
|
||||
server_challenge,
|
||||
|
||||
/** Server responded with reason_codes.success and final
|
||||
/** \brief Server responded with reason_codes.success and final
|
||||
* authentication data, which the Client validates.
|
||||
*/
|
||||
server_final
|
||||
@ -101,10 +100,10 @@ enum class auth_step_e {
|
||||
* publishing connection.
|
||||
*/
|
||||
enum class no_local_e : std::uint8_t {
|
||||
/** Application Messages can be forwarded to a connection with equal ClientID. */
|
||||
/** \brief Application Messages can be forwarded to a connection with equal ClientID. */
|
||||
no = 0b0,
|
||||
|
||||
/** Application Messages MUST NOT be forwarded to a connection with equal ClientID. */
|
||||
/** \brief Application Messages MUST NOT be forwarded to a connection with equal ClientID. */
|
||||
yes = 0b1
|
||||
};
|
||||
|
||||
@ -115,10 +114,10 @@ enum class no_local_e : std::uint8_t {
|
||||
* using this subscription keep the \__RETAIN\__ flag they were published with.
|
||||
*/
|
||||
enum class retain_as_published_e : std::uint8_t {
|
||||
/** Application Messages have the \__RETAIN\__ flag set to 0. */
|
||||
/** \brief Application Messages have the \__RETAIN\__ flag set to 0. */
|
||||
dont = 0b0,
|
||||
|
||||
/** Application Messages keep the \__RETAIN\__ flag they were published with. */
|
||||
/** \brief Application Messages keep the \__RETAIN\__ flag they were published with. */
|
||||
retain = 0b1
|
||||
};
|
||||
|
||||
@ -129,13 +128,13 @@ enum class retain_as_published_e : std::uint8_t {
|
||||
* when the subscription is established.
|
||||
*/
|
||||
enum class retain_handling_e : std::uint8_t {
|
||||
/** Send retained messages at the time of subscribe. */
|
||||
/** \brief Send retained messages at the time of subscribe. */
|
||||
send = 0b00,
|
||||
|
||||
/** Send retained message only if the subscription does not currently exist. */
|
||||
/** \brief Send retained message only if the subscription does not currently exist. */
|
||||
new_subscription_only = 0b01,
|
||||
|
||||
/** Do not send retained messages at the time of subscribe. */
|
||||
/** \brief Do not send retained messages at the time of subscribe. */
|
||||
not_send = 0b10
|
||||
};
|
||||
|
||||
@ -143,16 +142,18 @@ enum class retain_handling_e : std::uint8_t {
|
||||
* \brief Represents the \__SUBSCRIBE_OPTIONS\__ associated with each Subscription.
|
||||
*/
|
||||
struct subscribe_options {
|
||||
/// Maximum \__QOS\__ level at which the Server can send Application Messages to the Client.
|
||||
/** \brief Maximum \__QOS\__ level at which the Server can send Application Messages to the Client.
|
||||
qos_e max_qos = qos_e::exactly_once;
|
||||
|
||||
/// Option determining if Application Messages will be forwarded to a connection with an equal ClientID.
|
||||
/** \brief Option determining if Application Messages will be
|
||||
forwarded to a connection with an equal ClientID. */
|
||||
no_local_e no_local = no_local_e::yes;
|
||||
|
||||
/// Option determining if Application Message will keep their \__RETAIN\__ flag.
|
||||
/** \brief Option determining if Application Message will keep their \__RETAIN\__ flag. */
|
||||
retain_as_published_e retain_as_published = retain_as_published_e::retain;
|
||||
|
||||
/// Option determining if retained messages are sent when the subscription is established.
|
||||
/** \brief Option determining if retained messages are sent
|
||||
when the subscription is established. */
|
||||
retain_handling_e retain_handling = retain_handling_e::new_subscription_only;
|
||||
};
|
||||
|
||||
@ -161,10 +162,10 @@ struct subscribe_options {
|
||||
* Subscribe Options.
|
||||
*/
|
||||
struct subscribe_topic {
|
||||
/// An UTF-8 Encoded String indicating the Topics to which the Client wants to subscribe.
|
||||
/** \brief An UTF-8 Encoded String indicating the Topics to which the Client wants to subscribe. */
|
||||
std::string topic_filter;
|
||||
|
||||
/// The \ref subscribe_options associated with the subscription.
|
||||
/** \brief The \ref subscribe_options associated with the subscription. */
|
||||
subscribe_options sub_opts;
|
||||
};
|
||||
|
||||
|
24
index.html
Normal file
24
index.html
Normal file
@ -0,0 +1,24 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Boost.MQTT5</title>
|
||||
<meta http-equiv="refresh" content="0; URL=./doc/html/index.html">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
Automatic redirection failed, please go to
|
||||
<a href="./doc/html/index.html">./doc/html/index.html</a>
|
||||
<hr>
|
||||
<tt>
|
||||
Boost.MQTT5<br>
|
||||
<br>
|
||||
Copyright (C) 2025 Ivica Siladic, Bruno Iljazovic, Korina Simicevic<br>
|
||||
<br>
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
<a href=http://www.boost.org/LICENSE_1_0.txt>http://www.boost.org/LICENSE_1_0.txt</a>) <br>
|
||||
<br>
|
||||
</tt>
|
||||
</body>
|
||||
|
||||
</html>
|
15
meta/libraries.json
Normal file
15
meta/libraries.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"key": "mqtt5",
|
||||
"name": "MQTT5",
|
||||
"authors": [
|
||||
"Ivica Siladić",
|
||||
"Bruno Iljazović",
|
||||
"Korina Šimičević"
|
||||
],
|
||||
"description": "MQTT5 client library built on top of Boost.Asio.",
|
||||
"category": [
|
||||
"Concurrent",
|
||||
"IO"
|
||||
],
|
||||
"cxxstd": "17"
|
||||
}
|
Reference in New Issue
Block a user