mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-26 16:24:10 +08:00
Added interceptor for application messages
This commit is contained in:
@@ -119,11 +119,12 @@ namespace MQTTnet.TestApp.UniversalWindows
|
||||
payload = Convert.FromBase64String(Payload.Text);
|
||||
}
|
||||
|
||||
var message = new MqttApplicationMessage(
|
||||
Topic.Text,
|
||||
payload,
|
||||
qos,
|
||||
Retain.IsChecked == true);
|
||||
var message = new MqttApplicationMessageBuilder()
|
||||
.WithTopic(Topic.Text)
|
||||
.WithPayload(payload)
|
||||
.WithQualityOfServiceLevel(qos)
|
||||
.WithRetainFlag(Retain.IsChecked == true)
|
||||
.Build();
|
||||
|
||||
await _mqttClient.PublishAsync(message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user