mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-20 11:45:43 +08:00
Refactoring
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using MQTTnet.Core.Adapter;
|
||||
|
||||
namespace MQTTnet.Core.Server
|
||||
{
|
||||
@@ -11,7 +10,7 @@ namespace MQTTnet.Core.Server
|
||||
event EventHandler<MqttClientConnectedEventArgs> ClientConnected;
|
||||
event EventHandler<MqttClientDisconnectedEventArgs> ClientDisconnected;
|
||||
|
||||
IReadOnlyList<ConnectedMqttClient> GetConnectedClients();
|
||||
IList<ConnectedMqttClient> GetConnectedClients();
|
||||
void Publish(MqttApplicationMessage applicationMessage);
|
||||
|
||||
Task StartAsync();
|
||||
|
||||
@@ -103,7 +103,7 @@ namespace MQTTnet.Core.Server
|
||||
}
|
||||
}
|
||||
|
||||
public IReadOnlyList<ConnectedMqttClient> GetConnectedClients()
|
||||
public IList<ConnectedMqttClient> GetConnectedClients()
|
||||
{
|
||||
lock (_clientSessions)
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace MQTTnet.Core.Server
|
||||
_clientSessionsManager.ClientDisconnected += OnClientDisconnected;
|
||||
}
|
||||
|
||||
public IReadOnlyList<ConnectedMqttClient> GetConnectedClients()
|
||||
public IList<ConnectedMqttClient> GetConnectedClients()
|
||||
{
|
||||
return _clientSessionsManager.GetConnectedClients();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user