Files
HomeMonitor/Hub/Service/Hubs/EnvironmentHub.cs

19 lines
483 B
C#

using JetBrains.Annotations;
using Microsoft.AspNetCore.SignalR;
using System;
using System.Threading.Tasks;
namespace ChrisKaczor.HomeMonitor.Hub.Service.Hubs
{
[UsedImplicitly]
public class EnvironmentHub : Microsoft.AspNetCore.SignalR.Hub
{
[UsedImplicitly]
public async Task SendLatestReading(string message)
{
Console.WriteLine(message);
await Clients.Others.SendAsync("LatestReading", message);
}
}
}