mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-03-04 00:35:47 +08:00
28 lines
641 B
C#
28 lines
641 B
C#
using Microsoft.AspNetCore.SignalR;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Yi.Framework.WebCore.SignalRHub
|
|
{
|
|
public class MainHub : Hub
|
|
{
|
|
public override Task OnConnectedAsync()
|
|
{
|
|
return base.OnConnectedAsync();
|
|
}
|
|
|
|
public override Task OnDisconnectedAsync(Exception exception)
|
|
{
|
|
return base.OnDisconnectedAsync(exception);
|
|
}
|
|
|
|
public async Task SendAllTest(string test)
|
|
{
|
|
await Clients.All.SendAsync("ReceiveAllInfo", test);
|
|
}
|
|
}
|
|
}
|