mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-19 11:03:07 +08:00
Added TLS1.2 support to client and server.
Added MqttClientSslChannel and MqttServerSslChannel which both utilize an SSL stream. Added options to both MqttCLientOptions and MqttServerOptions. I was unable to update the code in MQTTnet.UniversalWindows due to my lack of Windows 10.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using MQTTnet.Core.Adapter;
|
||||
using MQTTnet.Core.Server;
|
||||
|
||||
namespace MQTTnet
|
||||
@@ -9,7 +10,8 @@ namespace MQTTnet
|
||||
{
|
||||
if (options == null) throw new ArgumentNullException(nameof(options));
|
||||
|
||||
return new MqttServer(options, new MqttServerAdapter());
|
||||
// The cast to IMqttServerAdapter is required... stupidly...
|
||||
return new MqttServer(options, options.UseSSL ? (IMqttServerAdapter)new MqttSslServerAdapter() : new MqttServerAdapter());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user