Ejemplo n.º 1
0
        public async Task AddToPartyAsHost(string partyName, string playerData)
        {
            await Groups.AddToGroupAsync(Context.ConnectionId, partyName);

            string partyResults = await _partyHandler.CreateNewPartyAsync(partyName.Split(':')[1]);

            if (partyResults == "false")
            {
                throw new HubException("Failed to Create New Party");
            }

            await Clients.Caller.SendAsync("NewPartyWithHost", partyResults);
        }