public async Task <string> CreateGameSession(string nickName) { var sessionKey = _sessionService.CreateNewGameSession(); _sessionService.GameSessions[sessionKey].AddPlayer(nickName); await Groups.AddToGroupAsync(this.Context.ConnectionId, sessionKey); return(sessionKey); }
public async Task <string> CreateGameSession(string nickName) { var sessionKey = _sessionService.CreateNewGameSession(); _sessionService.GameSessions[sessionKey].AddPlayer(nickName); _logger.LogInformation("STRESSEVENT: Game session created by '{0}'. Key '{1}'.", nickName, sessionKey); await Groups.AddToGroupAsync(this.Context.ConnectionId, sessionKey); return(sessionKey); }