mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-14 09:59:13 -05:00
19 lines
527 B
C#
19 lines
527 B
C#
using JetBrains.Annotations;
|
|
using Microsoft.AspNetCore.SignalR;
|
|
using Microsoft.Extensions.Logging;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ChrisKaczor.HomeMonitor.Hub.Service.Hubs
|
|
{
|
|
[UsedImplicitly]
|
|
public class PowerHub(ILogger<PowerHub> logger) : Microsoft.AspNetCore.SignalR.Hub
|
|
{
|
|
[UsedImplicitly]
|
|
public async Task SendLatestSample(string message)
|
|
{
|
|
logger.LogInformation(message);
|
|
|
|
await Clients.Others.SendAsync("LatestSample", message);
|
|
}
|
|
}
|
|
} |