private void MqttClient_ApplicationMessageReceived(object sender, MQTTnet.Core.MqttApplicationMessageReceivedEventArgs e)
        {
            if (e.ApplicationMessage.Topic == "response")
            {
                Console.WriteLine("### RECEIVED APPLICATION MESSAGE ###");
                Console.WriteLine();

                editMessage.Text  = "";
                editMessage.Text += "### RECEIVED APPLICATION MESSAGE ###";
                editMessage.Text += "$ Topic = " + e.ApplicationMessage.Topic;
                editMessage.Text += "$ Payload = " + Encoding.UTF8.GetString(e.ApplicationMessage.Payload);
                editMessage.Text += "$ QoS = " + e.ApplicationMessage.QualityOfServiceLevel;
                editMessage.Text += "$ Retain = " + e.ApplicationMessage.Retain;
                //Console.WriteLine();
            }
        }
Exemple #2
0
 private void MqttClient_ApplicationMessageReceived(object sender, MQTTnet.Core.MqttApplicationMessageReceivedEventArgs e)
 {
     throw new NotImplementedException();
 }