public override async Task OnDisconnectedAsync(Exception exception) { string name = Context.User.Identity.Name; ConnectionMapping <string> .Remove(name, Context.ConnectionId); await base.OnDisconnectedAsync(exception); }
public override async Task OnConnectedAsync() { string name = Context.User.Identity.Name; ConnectionMapping <string> .Add(name, Context.ConnectionId); await base.OnConnectedAsync(); }