Files
mqtt5/doc/qbk/examples/Tutorial.qbk
Korina Šimičević 73620e5653 publisher & receiver examples, better completion token examples
Reviewers: iljazovic, ivica

Reviewed By: ivica

Subscribers: miljen

Differential Revision: https://repo.mireo.local/D26582
2023-11-17 10:11:00 +01:00

30 lines
1.2 KiB
Plaintext

[/
Copyright (c) 2023 Mireo
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
]
[section:publisher The publisher]
This example will show how to use __Client__ as a publisher.
The __Client__ will use TCP to connect to the Broker, and __USE_AWAITABLE__ as the completion token.
To modify the connection type, refer to [link async_mqtt5.examples.network_connection Establishing a network connection with different protocols].
To use different completion token, refer to [link async_mqtt5.examples.completion_tokens Completion tokens].
[import ../../../example/publisher.cpp]
[publisher]
[endsect]
[section:receiver The receiver]
This example will show how to use __Client__ as a receiver.
The __Client__ will use TCP to connect to the Broker, and __USE_AWAITABLE__ as the completion token.
To modify the connection type, refer to [link async_mqtt5.examples.network_connection Establishing a network connection with different protocols].
To use different completion token, refer to [link async_mqtt5.examples.completion_tokens Completion tokens].
[import ../../../example/receiver.cpp]
[receiver]
[endsect]