protected function handleResponseForRequest($requestType, $repeatOnFailure = true) {
        switch($requestType) {
            case self::REQUEST_CHALLENGE:
                $expectedResponse = '\SteamCondenser\Servers\Packets\S2CCHALLENGEPacket';
                $requestPacket    = new A2SPLAYERPacket();
                break;
            case self::REQUEST_INFO:
                $expectedResponse = '\SteamCondenser\Servers\Packets\S2AINFOBasePacket';
                $requestPacket    = new A2SINFOPacket();
                break;
            case self::REQUEST_PLAYER:
                $expectedResponse = '\SteamCondenser\Servers\Packets\S2APLAYERPacket';
                $requestPacket    = new A2SPLAYERPacket($this->challengeNumber);
                break;
            case self::REQUEST_RULES:
                $expectedResponse = '\SteamCondenser\Servers\Packets\S2ARULESPacket';
                $requestPacket    = new A2SRULESPacket($this->challengeNumber);
                break;
            default:
                throw new SteamCondenserException('Called with wrong request type.');
        }

        $this->socket->send($requestPacket);
        $responsePacket = $this->socket->getReply();

        if($responsePacket instanceof S2AINFOBasePacket) {
            $this->infoHash = $responsePacket->getInfo();
        } elseif($responsePacket instanceof S2APLAYERPacket) {
            $this->playerHash = $responsePacket->getPlayerHash();
        } elseif($responsePacket instanceof S2ARULESPacket) {
            $this->rulesHash = $responsePacket->getRulesArray();
        } elseif($responsePacket instanceof S2CCHALLENGEPacket) {
            $this->challengeNumber = $responsePacket->getChallengeNumber();
        } else {
            throw new SteamCondenserException('Response of type ' . get_class($responsePacket) . ' cannot be handled by this method.');
        }

        if(!($responsePacket instanceof $expectedResponse)) {
            $this->logger->info("Expected {$expectedResponse}, got " . get_class($responsePacket) . '.');
            if($repeatOnFailure) {
                $this->handleResponseForRequest($requestType, false);
            }
        }
    }