Exemplo n.º 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);
        }
Exemplo n.º 2
0
        public override async Task OnConnectedAsync()
        {
            string name = Context.User.Identity.Name;

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

            await base.OnConnectedAsync();
        }