mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-25 07:41:32 +08:00
Add support for chaning passwords
This commit is contained in:
@@ -7,10 +7,8 @@ using System.Security.Cryptography.X509Certificates;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MQTTnet.Core.Adapter;
|
||||
using MQTTnet.Core.Serializer;
|
||||
using MQTTnet.Core.Server;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using MQTTnet.Core.Client;
|
||||
|
||||
namespace MQTTnet.Implementations
|
||||
{
|
||||
@@ -18,6 +16,7 @@ namespace MQTTnet.Implementations
|
||||
{
|
||||
private readonly ILogger<MqttServerAdapter> _logger;
|
||||
private readonly IMqttCommunicationAdapterFactory _mqttCommunicationAdapterFactory;
|
||||
|
||||
private CancellationTokenSource _cancellationTokenSource;
|
||||
private Socket _defaultEndpointSocket;
|
||||
private Socket _tlsEndpointSocket;
|
||||
|
||||
@@ -89,7 +89,7 @@ namespace MQTTnet.Implementations
|
||||
RawReceiveStream = ReceiveStream;
|
||||
}
|
||||
|
||||
private static Certificate LoadCertificate(BaseMqttClientOptions options)
|
||||
private static Certificate LoadCertificate(MqttClientOptions options)
|
||||
{
|
||||
if (options.TlsOptions.Certificates == null || !options.TlsOptions.Certificates.Any())
|
||||
{
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace MQTTnet
|
||||
|
||||
public MqttPacketSerializer CreateSerializer(MqttProtocolVersion protocolVersion)
|
||||
{
|
||||
return new MqttPacketSerializer()
|
||||
return new MqttPacketSerializer
|
||||
{
|
||||
ProtocolVersion = protocolVersion
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user