您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

MqttSubAckPacket.cs 673 B

7 年前
12345678910111213141516171819
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. using MQTTnet.Protocol;
  4. namespace MQTTnet.Packets
  5. {
  6. public class MqttSubAckPacket : MqttBasePacket, IMqttPacketWithIdentifier
  7. {
  8. public ushort? PacketIdentifier { get; set; }
  9. public IList<MqttSubscribeReturnCode> SubscribeReturnCodes { get; } = new List<MqttSubscribeReturnCode>();
  10. public override string ToString()
  11. {
  12. var subscribeReturnCodesText = string.Join(",", SubscribeReturnCodes.Select(f => f.ToString()));
  13. return "SubAck: [PacketIdentifier=" + PacketIdentifier + "] [SubscribeReturnCodes=" + subscribeReturnCodesText + "]";
  14. }
  15. }
  16. }