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

MqttPacketAwaiter.cs 459 B

12345678910111213141516
  1. using System;
  2. using System.Threading.Tasks;
  3. using MQTTnet.Core.Packets;
  4. namespace MQTTnet.Core.Client
  5. {
  6. public class MqttPacketAwaiter : TaskCompletionSource<MqttBasePacket>
  7. {
  8. public MqttPacketAwaiter(Func<MqttBasePacket, bool> packetSelector)
  9. {
  10. PacketSelector = packetSelector ?? throw new ArgumentNullException(nameof(packetSelector));
  11. }
  12. public Func<MqttBasePacket, bool> PacketSelector { get; }
  13. }
  14. }