Beispiel #1
0
        public override async Task OnDisconnectedAsync(Exception exception)
        {
            string name = Context.User.Identity.Name;

            ConnectionMapping <string> .Remove(name, Context.ConnectionId);

            await base.OnDisconnectedAsync(exception);
        }
Beispiel #2
0
        public override async Task OnConnectedAsync()
        {
            string name = Context.User.Identity.Name;

            ConnectionMapping <string> .Add(name, Context.ConnectionId);

            await base.OnConnectedAsync();
        }