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.

IMqttClient.cs 755 B

7 years ago
1234567891011121314151617181920212223
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading.Tasks;
  4. using MQTTnet.Core.Packets;
  5. namespace MQTTnet.Core.Client
  6. {
  7. public interface IMqttClient : IApplicationMessageReceiver
  8. {
  9. bool IsConnected { get; }
  10. event EventHandler<MqttClientConnectedEventArgs> Connected;
  11. event EventHandler<MqttClientDisconnectedEventArgs> Disconnected;
  12. Task<MqttClientConnectResult> ConnectAsync(IMqttClientOptions options);
  13. Task DisconnectAsync();
  14. Task<IList<MqttSubscribeResult>> SubscribeAsync(IEnumerable<TopicFilter> topicFilters);
  15. Task UnsubscribeAsync(IEnumerable<string> topicFilters);
  16. Task PublishAsync(IEnumerable<MqttApplicationMessage> applicationMessages);
  17. }
  18. }