using Microsoft.AspNetCore.SignalR; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace WIDESEAWCS_TaskInfoService { public class DeviceStatusHub : Hub { public async Task StartDeviceStatusUpdates(int offo) { if (offo == 1) { await Clients.Caller.SendAsync("ReceiveDeviceStatusUpdate", "开始设备状态监控"); } else { await Clients.Caller.SendAsync("ReceiveDeviceStatusUpdate", "停止设备状态监控"); } } } }