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.
 
 
 
 

26 line
969 B

  1. using System;
  2. using System.Collections.Generic;
  3. using System.Threading.Tasks;
  4. namespace MQTTnet.Server
  5. {
  6. public interface IMqttServer : IApplicationMessageReceiver, IApplicationMessagePublisher
  7. {
  8. event EventHandler<MqttServerStartedEventArgs> Started;
  9. event EventHandler<MqttClientConnectedEventArgs> ClientConnected;
  10. event EventHandler<MqttClientDisconnectedEventArgs> ClientDisconnected;
  11. event EventHandler<MqttClientSubscribedTopicEventArgs> ClientSubscribedTopic;
  12. event EventHandler<MqttClientUnsubscribedTopicEventArgs> ClientUnsubscribedTopic;
  13. IMqttServerOptions Options { get; }
  14. Task<IList<ConnectedMqttClient>> GetConnectedClientsAsync();
  15. Task SubscribeAsync(string clientId, IList<TopicFilter> topicFilters);
  16. Task UnsubscribeAsync(string clientId, IList<string> topicFilters);
  17. Task StartAsync(IMqttServerOptions options);
  18. Task StopAsync();
  19. }
  20. }