Added periodical pings of all known units

This commit is contained in:
ftc
2021-04-13 22:03:01 +03:00
parent 91d88b1e23
commit 80cad276e8
3 changed files with 75 additions and 0 deletions
+16
View File
@@ -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)