Skip to content

Commit

Permalink
New override method for Connect()
Browse files Browse the repository at this point in the history
Signed-off-by: Marco Sacco <[email protected]>
  • Loading branch information
bobmarco authored Apr 2, 2019
1 parent 0b73e23 commit 4be37eb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions M2Mqtt/MqttClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,18 @@ public byte Connect(string clientId)
return this.Connect(clientId, null, null, false, MqttMsgConnect.QOS_LEVEL_AT_MOST_ONCE, false, null, null, true, MqttMsgConnect.KEEP_ALIVE_PERIOD_DEFAULT);
}

/// <summary>
/// Connect to broker
/// </summary>
/// <param name="clientId">Client identifier</param>
/// <param name="cleanSession">Clean sessione flag</param>
/// <returns>Return code of CONNACK message from broker</returns>
public byte Connect(string clientId,
bool cleanSession)
{
return this.Connect(clientId, null, null, false, MqttMsgConnect.QOS_LEVEL_AT_MOST_ONCE, false, null, null, cleanSession, MqttMsgConnect.KEEP_ALIVE_PERIOD_DEFAULT);
}

/// <summary>
/// Connect to broker
/// </summary>
Expand Down

0 comments on commit 4be37eb

Please sign in to comment.