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.
 
 
 
 

19 lines
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. }