aws-crt-cpp
C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.
Public Member Functions | Public Attributes | List of all members
Aws::Crt::Mqtt5::PublishReceivedEventData Struct Reference

#include <Mqtt5Client.h>

Public Member Functions

 PublishReceivedEventData ()
 

Public Attributes

std::shared_ptr< PublishPacketpublishPacket
 
std::function< ScopedResource< PublishAcknowledgementHandle >)> acquirePublishAcknowledgement
 

Detailed Description

The data returned when a publish is made to a topic the MQTT5 client is subscribed to.

Constructor & Destructor Documentation

Aws::Crt::Mqtt5::PublishReceivedEventData::PublishReceivedEventData ( )
inline

Member Data Documentation

std::function<ScopedResource<PublishAcknowledgementHandle>)> Aws::Crt::Mqtt5::PublishReceivedEventData::acquirePublishAcknowledgement

Call this function within the OnPublishReceivedHandler callback to take manual control of the publish acknowledgement for this QoS 1 message, preventing the client from automatically sending a publish acknowledgement.

Returns a ScopedResource to a PublishAcknowledgementHandle that can be passed to Mqtt5Client::InvokePublishAcknowledgement() to send the publish acknowledgement to the broker.

Note
This function must be called within the OnPublishReceivedHandler callback. Calling it after the callback returns will return nullptr.
Only relevant for QoS 1 messages. Returns nullptr for QoS 0 messages.
std::shared_ptr<PublishPacket> Aws::Crt::Mqtt5::PublishReceivedEventData::publishPacket

The documentation for this struct was generated from the following file: