Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

IManagedMqttClient.cs 1.7 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using MQTTnet.Client.Connecting;
  2. using MQTTnet.Client.Disconnecting;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Threading;
  6. using System.Threading.Tasks;
  7. using MQTTnet.Client;
  8. namespace MQTTnet.Extensions.ManagedClient
  9. {
  10. public interface IManagedMqttClient : IApplicationMessageReceiver, IApplicationMessagePublisher, IDisposable
  11. {
  12. /// <summary>
  13. /// Gets the internally used MQTT client.
  14. /// This property should be used with caution because manipulating the internal client might break the managed client.
  15. /// </summary>
  16. IMqttClient InternalClient { get; }
  17. bool IsStarted { get; }
  18. bool IsConnected { get; }
  19. int PendingApplicationMessagesCount { get; }
  20. IManagedMqttClientOptions Options { get; }
  21. IMqttClientConnectedHandler ConnectedHandler { get; set; }
  22. IMqttClientDisconnectedHandler DisconnectedHandler { get; set; }
  23. IApplicationMessageProcessedHandler ApplicationMessageProcessedHandler { get; set; }
  24. IApplicationMessageSkippedHandler ApplicationMessageSkippedHandler { get; set; }
  25. IConnectingFailedHandler ConnectingFailedHandler { get; set; }
  26. ISynchronizingSubscriptionsFailedHandler SynchronizingSubscriptionsFailedHandler { get; set; }
  27. Task StartAsync(IManagedMqttClientOptions options);
  28. Task StopAsync();
  29. Task PingAsync(CancellationToken cancellationToken);
  30. Task SubscribeAsync(IEnumerable<MqttTopicFilter> topicFilters);
  31. Task UnsubscribeAsync(IEnumerable<string> topics);
  32. Task PublishAsync(ManagedMqttApplicationMessage applicationMessages);
  33. }
  34. }