Skip to content

Commit

Permalink
Merge pull request #101 from bobmarco/patch-3
Browse files Browse the repository at this point in the history
New override method for Connect()
  • Loading branch information
icraggs authored Apr 16, 2019
2 parents 0b73e23 + 4be37eb commit b2e64bc
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 b2e64bc

Please sign in to comment.