Exemple #1
0
        public override async Task OnDisconnectedAsync(Exception exception)
        {
            await Groups.RemoveFromGroupAsync(Context.ConnectionId, "SignalR Users");

            await base.OnDisconnectedAsync(exception);

            NLogHelp.InfoLog($"SignalR连接断开,连接Id:{Context.ConnectionId}");
        }
Exemple #2
0
        public override async Task OnConnectedAsync()
        {
            await Groups.AddToGroupAsync(Context.ConnectionId, "SignalR Users");

            await base.OnConnectedAsync();

            NLogHelp.InfoLog($"新的SignalR连接建立,连接Id:{Context.ConnectionId}");
        }