Update documents

This commit is contained in:
Christian Kratky
2017-09-19 23:07:42 +02:00
parent 83f1d74a76
commit 493c934463
2 changed files with 9 additions and 12 deletions
+6 -2
View File
@@ -13,9 +13,13 @@
<releaseNotes>* [Client] Added support for web socket communication channel (thanks to nowakpiotr)
* [Core] Huge performance optimizations (thanks to JanEggers)
* [Client] Fixed an issue when calling _DisconnectAsync_ and the connection is already closed.
* [Core] Added several new interfaces
* [Core] Added a factory for creation of application messages
* [Core] Fixed issues in connection handling
* [Client] Fixed issues with subscribing/unsubscribing (breaking change!)
</releaseNotes>
<copyright>Copyright Christian Kratky 2016-2017</copyright>
<tags>MQTT MQTTClient MQTTServer MQTTBroker Broker NETStandard IoT InternetOfThings Messaging Queue Hardware Arduino</tags>
<tags>MQTT Message Queue Telemetry Transport MQTTClient MQTTServer Server MQTTBroker Broker NETStandard IoT InternetOfThings Messaging Hardware Arduino Sensor Actuator M2M</tags>
<dependencies>
<group targetFramework="netstandard1.3">
@@ -24,7 +28,7 @@
</group>
<group targetFramework="uap10.0">
<dependency id="Microsoft.NETCore.UniversalWindowsPlatform" version="5.3.3" />
<dependency id="Microsoft.NETCore.UniversalWindowsPlatform" version="5.4.0" />
</group>
</dependencies>
+3 -10
View File
@@ -80,14 +80,12 @@ client.ApplicationMessageReceived += (s, e) =>
client.Connected += async (s, e) =>
{
Console.WriteLine("### CONNECTED WITH SERVER ###");
Console.WriteLine("### CONNECTED WITH SERVER, SUBSCRIBING ###");
await client.SubscribeAsync(new List<TopicFilter>
{
new TopicFilter("#", MqttQualityOfServiceLevel.AtMostOnce)
});
Console.WriteLine("### SUBSCRIBED ###");
};
client.Disconnected += async (s, e) =>
@@ -116,17 +114,12 @@ catch
Console.WriteLine("### WAITING FOR APPLICATION MESSAGES ###");
var messageFactory = new MqttApplicationMessageFactory();
while (true)
{
Console.ReadLine();
var applicationMessage = new MqttApplicationMessage(
"A/B/C",
Encoding.UTF8.GetBytes("Hello World"),
MqttQualityOfServiceLevel.AtLeastOnce,
false
);
var applicationMessage = messageFactory.CreateApplicationMessage("myTopic", "Hello World", MqttQualityOfServiceLevel.AtLeastOnce);
await client.PublishAsync(applicationMessage);
}
```