mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-14 17:23:11 -05:00
19 lines
533 B
C#
19 lines
533 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 WeatherHub(ILogger<WeatherHub> logger) : Microsoft.AspNetCore.SignalR.Hub
|
|
{
|
|
[UsedImplicitly]
|
|
public async Task SendLatestReading(string message)
|
|
{
|
|
logger.LogInformation(message);
|
|
|
|
await Clients.Others.SendAsync("LatestReading", message);
|
|
}
|
|
}
|
|
} |