mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 00:15:15 +08:00
20 lines
650 B
C#
20 lines
650 B
C#
using MQTTnet.Core.Client;
|
|
using MQTTnet.Core.Diagnostics;
|
|
using MQTTnet.Core.ManagedClient;
|
|
using MQTTnet.Implementations;
|
|
|
|
namespace MQTTnet
|
|
{
|
|
public class MqttClientFactory : IMqttClientFactory
|
|
{
|
|
public IMqttClient CreateMqttClient(IMqttNetTraceHandler traceHandler = null)
|
|
{
|
|
return new MqttClient(new MqttCommunicationAdapterFactory(), new MqttNetTrace(traceHandler));
|
|
}
|
|
|
|
public ManagedMqttClient CreateManagedMqttClient(IMqttNetTraceHandler traceHandler = null)
|
|
{
|
|
return new ManagedMqttClient(new MqttCommunicationAdapterFactory(), new MqttNetTrace());
|
|
}
|
|
}
|
|
} |