refactor player connection management, new examples