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

16 lines
459 B

  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. }