mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 01:03:01 +08:00
15 lines
444 B
C#
15 lines
444 B
C#
using System;
|
|
|
|
namespace MQTTnet.Extensions.WebSocket4Net
|
|
{
|
|
public static class MqttFactoryExtensions
|
|
{
|
|
public static IMqttFactory UseWebSocket4Net(this IMqttFactory mqttFactory)
|
|
{
|
|
if (mqttFactory == null) throw new ArgumentNullException(nameof(mqttFactory));
|
|
|
|
return mqttFactory.UseClientAdapterFactory(new WebSocket4NetMqttClientAdapterFactory(mqttFactory.DefaultLogger));
|
|
}
|
|
}
|
|
}
|