mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-11-08 11:51:41 +01:00
Reviewers: iljazovic, ivica Reviewed By: ivica Subscribers: miljen Differential Revision: https://repo.mireo.local/D26582
30 lines
1.2 KiB
Plaintext
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] |