1
wankeda
2 天以前 844c7c3ce2c39139490a6ecb0f35170f6cade290
1
2
3
4
5
6
7
8
9
10
11
12
13
using Microsoft.AspNetCore.SignalR;
 
namespace WIDESEA_Model
{
    public class WMSNoticeHub : Hub
    {
        // 前端监听这个方法就能收到消息
        public async Task SendMessage(string message)
        {
            await Clients.All.SendAsync("ReceiveMessage", message);
        }
    }
}