Esempio n. 1
0
        public async Task Connect(string login)
        {
            var connectionId = Context.ConnectionId;

            var users    = _userManager.GetAllUsers();
            var messages = await _messageService.GetMessages(login, users);

            await Clients.Caller.SelfConnected(messages);

            _userManager.AddUser(login, connectionId);
            await Clients.AllExcept(connectionId).NewUserConnected(login);
        }