Single Threaded

You can call both asynchronous (async) and synchronous (sync) APIs without any special precautions.

Multi-threaded

All distinct objects are not thread-safe. To access shared client and/or endpoint objects, construct them with a strand-wrapped executor for the underlying layer’s argument. The async_* member functions of client and endpoint will dispatch to the executor. As a result of the strand’s effect, your asynchronous processes will be serialized.

The following synchronous member functions are accessed directly. Therefore, you need to introduce locks or explicitly dispatch to the executor.

endpoint member function effects

acquire_unique_packet_id

Acquire the new unique packet_id

register_packet_id

Register the packet_id

release_packet_id

Release the packet_id

get_qos2_publish_handled_pids

Get already PUBLISH recv CompletionToken is invoked packet_ids

restore_qos2_publish_handled_pids

Restore already PUBLISH recv CompletionToken is invoked packet_ids

restore_packets

Restore pacets as stored packets

get_stored_packets

Get stored packets

get_protocol_version

Get MQTT protocol version

client member function effects

acquire_unique_packet_id

Acquire the new unique packet_id

register_packet_id

Register the packet_id

release_packet_id

Release the packet_id