mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 10:26:11 +08:00
Add support for retained application messages
This commit is contained in:
@@ -167,7 +167,7 @@ namespace MQTTnet.TestApp.NetFramework
|
||||
});
|
||||
}
|
||||
|
||||
private static void RunServerAsync()
|
||||
private static async Task RunServerAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -201,12 +201,12 @@ namespace MQTTnet.TestApp.NetFramework
|
||||
stopwatch.Restart();
|
||||
}
|
||||
};
|
||||
mqttServer.Start();
|
||||
await mqttServer.StartAsync();
|
||||
|
||||
Console.WriteLine("Press any key to exit.");
|
||||
Console.ReadLine();
|
||||
|
||||
mqttServer.Stop();
|
||||
await mqttServer.StopAsync();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
@@ -121,7 +121,7 @@ namespace MQTTnet.TestApp.NetFramework
|
||||
}
|
||||
}
|
||||
|
||||
private static void RunServerAsync(string[] arguments)
|
||||
private static async Task RunServerAsync(string[] arguments)
|
||||
{
|
||||
MqttTrace.TraceMessagePublished += (s, e) =>
|
||||
{
|
||||
@@ -151,12 +151,12 @@ namespace MQTTnet.TestApp.NetFramework
|
||||
};
|
||||
|
||||
var mqttServer = new MqttServerFactory().CreateMqttServer(options);
|
||||
mqttServer.Start();
|
||||
await mqttServer.StartAsync();
|
||||
|
||||
Console.WriteLine("Press any key to exit.");
|
||||
Console.ReadLine();
|
||||
|
||||
mqttServer.Stop();
|
||||
await mqttServer.StopAsync();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -166,4 +166,4 @@ namespace MQTTnet.TestApp.NetFramework
|
||||
Console.ReadLine();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user