mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-16 09:13:02 +08:00
Add interface for server options. Add context class for connection validator (hide internal packets).
This commit is contained in:
@@ -23,11 +23,9 @@ namespace MQTTnet.TestApp.NetCore
|
||||
{
|
||||
if (p.Username != "USER" || p.Password != "PASS")
|
||||
{
|
||||
return MqttConnectReturnCode.ConnectionRefusedBadUsernameOrPassword;
|
||||
p.ReturnCode = MqttConnectReturnCode.ConnectionRefusedBadUsernameOrPassword;
|
||||
}
|
||||
}
|
||||
|
||||
return MqttConnectReturnCode.ConnectionAccepted;
|
||||
},
|
||||
|
||||
Storage = new RetainedMessageHandler(),
|
||||
|
||||
Reference in New Issue
Block a user