Skip to content

Commit

Permalink
added sessionPresent setter to ModifiableConnackPacket. (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
Florian-Limpoeck committed Apr 24, 2024
1 parent e3667f8 commit b40aee3
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,4 +116,18 @@ public interface ModifiableConnackPacket extends ConnackPacket {
* @since 4.6.0, CE 2021.1
*/
void setAssignedClientIdentifier(@Nullable String assignedClientIdentifier);

/**
* Sets the session present flag in the CONNACK packet HiveMQ sends to the client.
* <p>
* This flag only impacts the content of the CONNACK packet, the flag does not change overall HiveMQ client session
* behavior.
* <p>
* CAUTION: Clients typically clear their previous state when they receive a CONNACK packet with sessionPresent =
* false. Setting this flag to false can impact pending QoS 2 message flows.
*
* @param sessionPresent The session present flag sent in the CONNACK.
* @since 4.28.0, CE 2024.4
*/
void setSessionPresent(boolean sessionPresent);
}

0 comments on commit b40aee3

Please sign in to comment.