You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 7 години
преди 7 години
преди 7 години
преди 7 години
преди 7 години
123456789101112131415161718192021222324
  1. using System;
  2. using System.IO;
  3. using MQTTnet.Core.Packets;
  4. namespace MQTTnet.Core.Adapter
  5. {
  6. public sealed class ReceivedMqttPacket : IDisposable
  7. {
  8. public ReceivedMqttPacket(MqttPacketHeader header, MemoryStream body)
  9. {
  10. Header = header ?? throw new ArgumentNullException(nameof(header));
  11. Body = body ?? throw new ArgumentNullException(nameof(body));
  12. }
  13. public MqttPacketHeader Header { get; }
  14. public MemoryStream Body { get; }
  15. public void Dispose()
  16. {
  17. Body?.Dispose();
  18. }
  19. }
  20. }