Refactor options

This commit is contained in:
Christian Kratky
2017-10-04 13:58:51 +02:00
parent d23ab88add
commit 67267c05fd
40 changed files with 291 additions and 197 deletions
+11 -6
View File
@@ -52,13 +52,18 @@ namespace MQTTnet.TestApp.NetFramework
try
{
var options = new MqttClientOptions
var options = new MqttClientWebSocketOptions
{
Server = "localhost",
ClientId = "XYZ",
CleanSession = true
Uri = "broker.hivemq.com:8000/mqtt"
};
////var options = new MqttClientOptions
////{
//// Server = "localhost",
//// ClientId = "XYZ",
//// CleanSession = true
////};
var client = new MqttClientFactory().CreateMqttClient(options);
client.ApplicationMessageReceived += (s, e) =>
{
@@ -87,7 +92,7 @@ namespace MQTTnet.TestApp.NetFramework
try
{
await client.ConnectAsync();
await client.ConnectAsync(options);
}
catch
{
@@ -97,7 +102,7 @@ namespace MQTTnet.TestApp.NetFramework
try
{
await client.ConnectAsync();
await client.ConnectAsync(options);
}
catch (Exception exception)
{