Exemplo n.º 1
0
        public override async Task OnConnectedAsync()
        {
            SignalRMemberService.AddConnection(Context);

            await UpdateOnlineUsers(SignalRMemberService.GetOnlineUsers(), SignalRMemberService.GetVisitorCount());

            await _groupChatService.AddUserConnectionToGroupsAsync(Context.UserIdentifier, Context.ConnectionId);

            await ValidateVersion();
        }
Exemplo n.º 2
0
        public override async Task OnDisconnectedAsync(Exception exception)
        {
            SignalRMemberService.RemoveConnection(Context);

            await UpdateOnlineUsers(SignalRMemberService.GetOnlineUsers(), SignalRMemberService.GetVisitorCount());
        }