You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MqttServerFactory.cs 505 B

123456789101112131415161718
  1. using System;
  2. using System.Collections.Generic;
  3. using MQTTnet.Core.Adapter;
  4. using MQTTnet.Core.Server;
  5. using MQTTnet.Implementations;
  6. namespace MQTTnet
  7. {
  8. public class MqttServerFactory : IMqttServerFactory
  9. {
  10. public IMqttServer CreateMqttServer(MqttServerOptions options)
  11. {
  12. if (options == null) throw new ArgumentNullException(nameof(options));
  13. return new MqttServer(options, new List<IMqttServerAdapter> { new MqttServerAdapter() });
  14. }
  15. }
  16. }