mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 18:43:10 +08:00
Add interface for server options. Add context class for connection validator (hide internal packets).
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using MQTTnet.Packets;
|
||||
using MQTTnet.Protocol;
|
||||
|
||||
namespace MQTTnet.Server
|
||||
{
|
||||
@@ -62,7 +60,7 @@ namespace MQTTnet.Server
|
||||
return this;
|
||||
}
|
||||
|
||||
public MqttServerOptionsBuilder WithConnectionValidator(Func<MqttConnectPacket, MqttConnectReturnCode> value)
|
||||
public MqttServerOptionsBuilder WithConnectionValidator(Action<MqttConnectionValidatorContext> value)
|
||||
{
|
||||
_options.ConnectionValidator = value;
|
||||
return this;
|
||||
@@ -80,7 +78,7 @@ namespace MQTTnet.Server
|
||||
return this;
|
||||
}
|
||||
|
||||
public MqttServerOptions Build()
|
||||
public IMqttServerOptions Build()
|
||||
{
|
||||
return _options;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user