33 lines
767 B
C#
33 lines
767 B
C#
|
|
using Microsoft.AspNetCore.SignalR;
|
|||
|
|
using System;
|
|||
|
|
using System.Collections.Generic;
|
|||
|
|
using System.Linq;
|
|||
|
|
using System.Text;
|
|||
|
|
using System.Threading.Tasks;
|
|||
|
|
|
|||
|
|
namespace DOAN.ServiceCore.Signalr
|
|||
|
|
{
|
|||
|
|
public class PBLhub : Hub
|
|||
|
|
{
|
|||
|
|
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 接受消息
|
|||
|
|
/// </summary>
|
|||
|
|
/// <param name="message"></param>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public async Task SendNotification(string message)
|
|||
|
|
{
|
|||
|
|
// 向所有客户端发送通知
|
|||
|
|
await Clients.All.SendAsync("BOMExcept", message);
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
public async Task PBL_bom_except(string message)
|
|||
|
|
{
|
|||
|
|
Console.WriteLine(message);
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
}
|
|||
|
|
}
|