mirror of
https://github.com/boostorg/mqtt5.git
synced 2025-11-07 19:31:37 +01:00
23 lines
1.0 KiB
Plaintext
23 lines
1.0 KiB
Plaintext
|
|
[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]
|