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.
 
 
 
 

15 lines
419 B

  1. using System;
  2. namespace MQTTnet.Extensions.WebSocket4Net
  3. {
  4. public static class MqttFactoryExtensions
  5. {
  6. public static IMqttFactory UseWebSocket4Net(this IMqttFactory mqttFactory)
  7. {
  8. if (mqttFactory == null) throw new ArgumentNullException(nameof(mqttFactory));
  9. return mqttFactory.UseClientAdapterFactory(new WebSocket4NetMqttClientAdapterFactory());
  10. }
  11. }
  12. }