mirror of
https://github.com/ckaczor/HomeMonitor.git
synced 2026-01-13 17:22:54 -05:00
27 lines
717 B
C#
27 lines
717 B
C#
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 RequestLatestStatus()
|
|
{
|
|
Console.WriteLine("RequestLatestStatus");
|
|
|
|
await Clients.Others.SendAsync("RequestLatestStatus");
|
|
}
|
|
|
|
[UsedImplicitly]
|
|
public async Task SendLatestStatus(string message)
|
|
{
|
|
Console.WriteLine($"LatestStatus: {message}");
|
|
|
|
await Clients.Others.SendAsync("LatestStatus", message);
|
|
}
|
|
}
|
|
} |