Added periodical pings of all known units
This commit is contained in:
@@ -103,6 +103,22 @@ namespace ESPServer
|
||||
}
|
||||
}
|
||||
|
||||
internal Dictionary<string, string> GetUnitIPs()
|
||||
{
|
||||
var result = new Dictionary<string, string>();
|
||||
lock (units)
|
||||
{
|
||||
foreach (var u in units)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(u.ip))
|
||||
{
|
||||
result[u.id] = u.ip;
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public Unit GetUnit(string id)
|
||||
{
|
||||
lock (units)
|
||||
|
||||
Reference in New Issue
Block a user