Files
HomeMonitor/Hub/Service/Hubs/WeatherHub.cs
2019-07-21 11:03:10 -04:00

19 lines
479 B
C#

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