Ejemplo n.º 1
0
        public async Task AddToGroup(string groupName, string userName)
        {
            var connectionId = Context.ConnectionId;

            await Groups.AddToGroupAsync(connectionId, groupName); //todo move to confirm player login - to add to group only once confirmed

            _roomConnections.AddToRoom(groupName, connectionId, userName);

            await Clients.Group(groupName).SendAsync("RecieveNewPlayerMaster", connectionId, userName);
        }