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.1 KiB

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading.Tasks;
  4. using MQTTnet.Client;
  5. namespace MQTTnet.Extensions.ManagedClient
  6. {
  7. public interface IManagedMqttClient : IApplicationMessageReceiver, IApplicationMessagePublisher, IDisposable
  8. {
  9. bool IsStarted { get; }
  10. bool IsConnected { get; }
  11. int PendingApplicationMessagesCount { get; }
  12. event EventHandler<MqttClientConnectedEventArgs> Connected;
  13. event EventHandler<MqttClientDisconnectedEventArgs> Disconnected;
  14. event EventHandler<ApplicationMessageProcessedEventArgs> ApplicationMessageProcessed;
  15. event EventHandler<MqttManagedProcessFailedEventArgs> ConnectingFailed;
  16. event EventHandler<MqttManagedProcessFailedEventArgs> SynchronizingSubscriptionsFailed;
  17. Task StartAsync(IManagedMqttClientOptions options);
  18. Task StopAsync();
  19. Task SubscribeAsync(IEnumerable<TopicFilter> topicFilters);
  20. Task UnsubscribeAsync(IEnumerable<string> topics);
  21. Task PublishAsync(ManagedMqttApplicationMessage applicationMessages);
  22. }
  23. }