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

IManagedMqttClient.cs 1.2 KiB

1234567891011121314151617181920212223242526272829303132
  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. IManagedMqttClientOptions Options { get; }
  13. event EventHandler<MqttClientConnectedEventArgs> Connected;
  14. event EventHandler<MqttClientDisconnectedEventArgs> Disconnected;
  15. event EventHandler<ApplicationMessageProcessedEventArgs> ApplicationMessageProcessed;
  16. event EventHandler<ApplicationMessageSkippedEventArgs> ApplicationMessageSkipped;
  17. event EventHandler<MqttManagedProcessFailedEventArgs> ConnectingFailed;
  18. event EventHandler<MqttManagedProcessFailedEventArgs> SynchronizingSubscriptionsFailed;
  19. Task StartAsync(IManagedMqttClientOptions options);
  20. Task StopAsync();
  21. Task SubscribeAsync(IEnumerable<TopicFilter> topicFilters);
  22. Task UnsubscribeAsync(IEnumerable<string> topics);
  23. Task PublishAsync(ManagedMqttApplicationMessage applicationMessages);
  24. }
  25. }