25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
841 B

  1. using System;
  2. using MQTTnet.Core.Protocol;
  3. namespace MQTTnet.Core.Packets
  4. {
  5. public sealed class MqttPublishPacket : MqttBasePublishPacket
  6. {
  7. public bool Retain { get; set; }
  8. public MqttQualityOfServiceLevel QualityOfServiceLevel { get; set; }
  9. public bool Dup { get; set; }
  10. public string Topic { get; set; }
  11. public byte[] Payload { get; set; }
  12. public override string ToString()
  13. {
  14. return nameof(MqttPublishPacket) +
  15. ": [Topic=" + Topic + "]" +
  16. " [Payload=" + Convert.ToBase64String(Payload) + "]" +
  17. " [QoSLevel=" + QualityOfServiceLevel + "]" +
  18. " [Dup=" + Dup + "]" +
  19. " [Retain=" + Retain + "]" +
  20. " [PacketIdentifier=" + PacketIdentifier + "]";
  21. }
  22. }
  23. }