Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

MqttServerFactory.cs 647 B

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