25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MqttFactoryExtensions.cs 419 B

1234567891011121314
  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. }