mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-15 00:15:15 +08:00
19 lines
505 B
C#
19 lines
505 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using MQTTnet.Core.Adapter;
|
|
using MQTTnet.Core.Server;
|
|
using MQTTnet.Implementations;
|
|
|
|
namespace MQTTnet
|
|
{
|
|
public class MqttServerFactory : IMqttServerFactory
|
|
{
|
|
public IMqttServer CreateMqttServer(MqttServerOptions options)
|
|
{
|
|
if (options == null) throw new ArgumentNullException(nameof(options));
|
|
|
|
return new MqttServer(options, new List<IMqttServerAdapter> { new MqttServerAdapter() });
|
|
}
|
|
}
|
|
}
|