mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 01:03:01 +08:00
24 lines
759 B
C#
24 lines
759 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using MQTTnet.Core.Packets;
|
|
|
|
namespace MQTTnet.Core.Client
|
|
{
|
|
public interface IMqttClient
|
|
{
|
|
bool IsConnected { get; }
|
|
|
|
event EventHandler<MqttApplicationMessageReceivedEventArgs> ApplicationMessageReceived;
|
|
event EventHandler Connected;
|
|
event EventHandler Disconnected;
|
|
|
|
Task ConnectAsync(MqttApplicationMessage willApplicationMessage = null);
|
|
Task DisconnectAsync();
|
|
|
|
Task<IList<MqttSubscribeResult>> SubscribeAsync(IEnumerable<TopicFilter> topicFilters);
|
|
Task UnsubscribeAsync(IEnumerable<string> topicFilters);
|
|
|
|
Task PublishAsync(IEnumerable<MqttApplicationMessage> applicationMessages);
|
|
}
|
|
} |