您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

19 行
618 B

  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System;
  5. namespace MQTTnet.Extensions.WebSocket4Net
  6. {
  7. public static class MqttFactoryExtensions
  8. {
  9. public static MqttFactory UseWebSocket4Net(this MqttFactory mqttFactory)
  10. {
  11. if (mqttFactory == null) throw new ArgumentNullException(nameof(mqttFactory));
  12. return mqttFactory.UseClientAdapterFactory(new WebSocket4NetMqttClientAdapterFactory());
  13. }
  14. }
  15. }