Optimized signalR messaging ( send messages only when there are changes )

Added broadcast method to send data to new clients
This commit is contained in:
Lucio Maranta
2018-02-20 11:32:25 +01:00
parent 134a1b5e34
commit a5d919e159
13 changed files with 232 additions and 75 deletions
@@ -71,10 +71,10 @@ namespace Step.Database.Controllers
private bool GetIfFunctionalityIsActive(List<FunctionalityModel> functionalityList, int id, bool functionAccessIsEnabled)
{
// If id is not mapped or function is false by database config return
if (id == 0 || !functionAccessIsEnabled)
if (id == -1 || !functionAccessIsEnabled)
return functionAccessIsEnabled;
// Return PLC data
return functionalityList[id - 1].IsActive;
return functionalityList[id].IsActive;
}
}
}