mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 09:13:02 +08:00
32 lines
1.3 KiB
C#
32 lines
1.3 KiB
C#
using MQTTnet.Server.Status;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace MQTTnet.Server
|
|
{
|
|
public interface IMqttServer : IApplicationMessageReceiver, IApplicationMessagePublisher
|
|
{
|
|
bool IsStarted { get; }
|
|
IMqttServerStartedHandler StartedHandler { get; set; }
|
|
IMqttServerStoppedHandler StoppedHandler { get; set; }
|
|
|
|
IMqttServerClientConnectedHandler ClientConnectedHandler { get; set; }
|
|
IMqttServerClientDisconnectedHandler ClientDisconnectedHandler { get; set; }
|
|
IMqttServerClientSubscribedTopicHandler ClientSubscribedTopicHandler { get; set; }
|
|
IMqttServerClientUnsubscribedTopicHandler ClientUnsubscribedTopicHandler { get; set; }
|
|
|
|
IMqttServerOptions Options { get; }
|
|
|
|
Task<IList<IMqttClientStatus>> GetClientStatusAsync();
|
|
Task<IList<IMqttSessionStatus>> GetSessionStatusAsync();
|
|
|
|
Task<IList<MqttApplicationMessage>> GetRetainedApplicationMessagesAsync();
|
|
Task ClearRetainedApplicationMessagesAsync();
|
|
|
|
Task SubscribeAsync(string clientId, ICollection<TopicFilter> topicFilters);
|
|
Task UnsubscribeAsync(string clientId, ICollection<string> topicFilters);
|
|
|
|
Task StartAsync(IMqttServerOptions options);
|
|
Task StopAsync();
|
|
}
|
|
} |