Add device status to hub service

This commit is contained in:
2022-08-17 15:58:43 -04:00
parent 30be1ee202
commit 054396d242
3 changed files with 21 additions and 1 deletions

View File

@@ -0,0 +1,19 @@
using JetBrains.Annotations;
using Microsoft.AspNetCore.SignalR;
using System;
using System.Threading.Tasks;
namespace ChrisKaczor.HomeMonitor.Hub.Service.Hubs
{
[UsedImplicitly]
public class DeviceStatusHub : Microsoft.AspNetCore.SignalR.Hub
{
[UsedImplicitly]
public async Task SendLatestStatus(string message)
{
Console.WriteLine(message);
await Clients.Others.SendAsync("LatestStatus", message);
}
}
}