mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 17:23:04 +08:00
Add extension for RPC calls; replace locks; Refactored storage in Managed Client
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MQTTnet.Client;
|
||||
using MQTTnet.Protocol;
|
||||
|
||||
namespace MQTTnet.TestApp.NetCore
|
||||
{
|
||||
@@ -17,7 +18,8 @@ namespace MQTTnet.TestApp.NetCore
|
||||
CleanSession = true,
|
||||
ChannelOptions = new MqttClientTcpOptions
|
||||
{
|
||||
Server = "localhost"
|
||||
//Server = "localhost",
|
||||
Server = "192.168.1.174"
|
||||
},
|
||||
//ChannelOptions = new MqttClientWebSocketOptions
|
||||
//{
|
||||
@@ -78,6 +80,8 @@ namespace MQTTnet.TestApp.NetCore
|
||||
{
|
||||
Console.ReadLine();
|
||||
|
||||
await client.SubscribeAsync(new TopicFilter("test", MqttQualityOfServiceLevel.AtMostOnce));
|
||||
|
||||
var applicationMessage = new MqttApplicationMessageBuilder()
|
||||
.WithTopic("A/B/C")
|
||||
.WithPayload("Hello World")
|
||||
|
||||
Reference in New Issue
Block a user