Files
mqtt5/doc/qbk/examples/Tutorial.qbk

23 lines
1.0 KiB
Plaintext
Raw Normal View History

[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]