Cleanups
This commit is contained in:
@@ -25,7 +25,16 @@ namespace BlubbFish.Utils.IoT.Connector.Data {
|
||||
} else {
|
||||
this.client.Connect(Guid.NewGuid().ToString());
|
||||
}
|
||||
this.client.Subscribe(new String[] { "#" }, new Byte[] { MqttMsgBase.QOS_LEVEL_AT_LEAST_ONCE });
|
||||
if (this.settings.ContainsKey("topic")) {
|
||||
Int32 l = this.settings["topic"].Split(';').Length;
|
||||
Byte[] qos = new Byte[l];
|
||||
for (Int32 i = 0; i < qos.Length; i++) {
|
||||
qos[i] = MqttMsgBase.QOS_LEVEL_AT_LEAST_ONCE;
|
||||
}
|
||||
this.client.Subscribe(this.settings["topic"].Split(';'), qos);
|
||||
} else {
|
||||
this.client.Subscribe(new String[] { "#" }, new Byte[] { MqttMsgBase.QOS_LEVEL_AT_LEAST_ONCE });
|
||||
}
|
||||
}
|
||||
|
||||
private void Client_MqttMsgPublishReceived(Object sender, MqttMsgPublishEventArgs e) {
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user