mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-17 01:33:03 +08:00
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.
25 lines
639 B
C#
25 lines
639 B
C#
using System;
|
|
using MQTTnet.Core.Packets;
|
|
using MQTTnet.Core.Protocol;
|
|
|
|
namespace MQTTnet.Core.Server
|
|
{
|
|
public class MqttServerOptions
|
|
{
|
|
public int Port { get; set; } = 1883;
|
|
|
|
public int ConnectionBacklog { get; set; } = 10;
|
|
|
|
public TimeSpan DefaultCommunicationTimeout { get; set; } = TimeSpan.FromSeconds(10);
|
|
|
|
public Func<MqttConnectPacket, MqttConnectReturnCode> ConnectionValidator { get; set; }
|
|
|
|
public bool UseSSL = false;
|
|
|
|
/// <summary>
|
|
/// The path to the X509 SSL certificate.
|
|
/// </summary>
|
|
public string CertificatePath = string.Empty;
|
|
}
|
|
}
|