Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolver::resolveAll #67

Closed
wants to merge 3 commits into from

Conversation

WyriHaximus
Copy link
Member

The status quo with the resolver is that resolve will always return one IP address when resolving a hostname, even when the query response yields more. This proposed resolveAll method will return all addresses yielded from the query response.

$factory = new Factory();
$resolver = $factory->create('8.8.8.8', $loop);

$name = isset($argv[1]) ? $argv[1] : 'blog.wyrihaximus.net';
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case anyone wonders why my own blog, because it is hosted on AWS CloudFront and this always returns more then one IP Address

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add that as a code comment rather than review comment.

});
}

public function extractAddress(Query $query, Message $response)
public function extractAddresses(Query $query, Message $response)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this an intended BC break?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree here, while this method isn't intended to be used from the outside, it's still part of our (current) public API.

Copy link
Member

@clue clue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, let's resolve the minor BC break below and let's get this in! :shipit:

});
}

public function extractAddress(Query $query, Message $response)
public function extractAddresses(Query $query, Message $response)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree here, while this method isn't intended to be used from the outside, it's still part of our (current) public API.

@WyriHaximus WyriHaximus added this to the v0.4.11 milestone Aug 23, 2017
@WyriHaximus
Copy link
Member Author

Ping @clue @jsor

@clue clue removed this from the v0.4.11 milestone Aug 23, 2017
@clue clue added this to the v0.4.16 milestone Jun 28, 2018
@clue clue removed this from the v0.4.16 milestone Jun 29, 2018
@jsor jsor closed this in #110 Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants