#include <Mqtt5Packets.h>
Data model of an MQTT5 DISCONNECT packet.
◆ DisconnectPacket() [1/4]
◆ DisconnectPacket() [2/4]
Aws::Crt::Mqtt5::DisconnectPacket::DisconnectPacket |
( |
const aws_mqtt5_packet_disconnect_view & |
raw_options, |
|
|
Allocator * |
allocator = ApiAllocator() |
|
) |
| |
|
noexcept |
◆ ~DisconnectPacket()
Aws::Crt::Mqtt5::DisconnectPacket::~DisconnectPacket |
( |
| ) |
|
|
virtual |
◆ DisconnectPacket() [3/4]
Aws::Crt::Mqtt5::DisconnectPacket::DisconnectPacket |
( |
const DisconnectPacket & |
| ) |
|
|
delete |
◆ DisconnectPacket() [4/4]
◆ getReasonCode()
Value indicating the reason that the sender is closing the connection
See MQTT5 Disconnect Reason Code
- Returns
- Value indicating the reason that the sender is closing the connection
◆ getReasonString()
Additional diagnostic information about the reason that the sender is closing the connection
See MQTT5 Reason String
- Returns
- Additional diagnostic information about the reason that the sender is closing the connection
◆ getServerReference()
Property indicating an alternate server that the client may temporarily or permanently attempt to connect to instead of the configured endpoint. Will only be set if the reason code indicates another server may be used (ServerMoved, UseAnotherServer).
See MQTT5 Server Reference
- Returns
- Property indicating an alternate server that the client may temporarily or permanently attempt to connect to instead of the configured endpoint.
◆ getSessionExpiryIntervalSec()
const Crt::Optional< uint32_t > & Aws::Crt::Mqtt5::DisconnectPacket::getSessionExpiryIntervalSec |
( |
| ) |
const |
|
noexcept |
A change to the session expiry interval negotiated at connection time as part of the disconnect. Only valid for DISCONNECT packets sent from client to server. It is not valid to attempt to change session expiry from zero to a non-zero value.
See MQTT5 Session Expiry Interval
- Returns
- A change to the session expiry interval negotiated at connection time as part of the disconnect.
◆ getType()
PacketType Aws::Crt::Mqtt5::DisconnectPacket::getType |
( |
| ) |
|
|
inlineoverridevirtual |
◆ getUserProperties()
List of MQTT5 user properties included with the packet.
See MQTT5 User Property
- Returns
- List of MQTT5 user properties included with the packet.
◆ initializeRawOptions()
bool Aws::Crt::Mqtt5::DisconnectPacket::initializeRawOptions |
( |
aws_mqtt5_packet_disconnect_view & |
raw_options | ) |
|
|
noexcept |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ WithReasonCode()
Sets the value indicating the reason that the sender is closing the connection
See MQTT5 Disconnect Reason Code
- Parameters
-
reasonCode | Value indicating the reason that the sender is closing the connection |
- Returns
- The DisconnectPacket Object after setting the reason code.
◆ WithReasonString()
Sets the additional diagnostic information about the reason that the sender is closing the connection
See MQTT5 Reason String
- Parameters
-
reasonString | Additional diagnostic information about the reason that the sender is closing the connection |
- Returns
- The DisconnectPacket Object after setting the reason string.
◆ WithServerReference()
Sets the property indicating an alternate server that the client may temporarily or permanently attempt to connect to instead of the configured endpoint. Will only be set if the reason code indicates another server may be used (ServerMoved, UseAnotherServer).
See MQTT5 Server Reference
- Parameters
-
serverReference | Property indicating an alternate server that the client may temporarily or permanently attempt to connect to instead of the configured endpoint. |
- Returns
- The DisconnectPacket Object after setting the server reference.
◆ WithSessionExpiryIntervalSec()
DisconnectPacket & Aws::Crt::Mqtt5::DisconnectPacket::WithSessionExpiryIntervalSec |
( |
const uint32_t |
sessionExpiryIntervalSeconds | ) |
|
|
noexcept |
Sets the change to the session expiry interval negotiated at connection time as part of the disconnect. Only valid for DISCONNECT packets sent from client to server. It is not valid to attempt to change session expiry from zero to a non-zero value.
See MQTT5 Session Expiry Interval
- Parameters
-
sessionExpiryIntervalSeconds | |
- Returns
- The DisconnectPacket Object after setting the session expiry interval.
◆ WithUserProperties() [1/2]
Sets the list of MQTT5 user properties included with the packet.
See MQTT5 User Property
- Parameters
-
userProperties | List of MQTT5 user properties included with the packet. |
- Returns
- The DisconnectPacket Object after setting the user properties.
◆ WithUserProperties() [2/2]
Sets the list of MQTT5 user properties included with the packet.
See MQTT5 User Property
- Parameters
-
userProperties | List of MQTT5 user properties included with the packet. |
- Returns
- The DisconnectPacket Object after setting the user properties.
◆ WithUserProperty()
Put a MQTT5 user property to the back of the packet user property vector/list
See MQTT5 User Property
- Parameters
-
property | set of userProperty of MQTT5 user properties included with the packet. |
- Returns
- The ConnectPacket Object after setting the user property
The documentation for this class was generated from the following files: