Skip to content

Commit

Permalink
Add support for CreateLowLevelMqttClient
Browse files Browse the repository at this point in the history
  • Loading branch information
xljiulang committed Nov 15, 2024
1 parent 580257a commit 4f6b7ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/MQTTnet.AspnetCore/IMqttClientFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using MQTTnet.LowLevelClient;

namespace MQTTnet.AspNetCore
{
public interface IMqttClientFactory
{
IMqttClient CreateMqttClient();

ILowLevelMqttClient CreateLowLevelMqttClient();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

using MQTTnet.Adapter;
using MQTTnet.Diagnostics.Logger;
using MQTTnet.LowLevelClient;

namespace MQTTnet.AspNetCore
{
Expand All @@ -24,5 +25,10 @@ public IMqttClient CreateMqttClient()
{
return new MqttClient(_mqttClientAdapterFactory, _logger);
}

public ILowLevelMqttClient CreateLowLevelMqttClient()
{
return new LowLevelMqttClient(_mqttClientAdapterFactory, _logger);
}
}
}

0 comments on commit 4f6b7ae

Please sign in to comment.