Skip to content

Conversation

@yschimke
Copy link
Collaborator

@yschimke yschimke commented Feb 5, 2022

Not any sort of suggested or refined API. But checking out the options for AsyncDns on both Android (DnsResolver on API 29+) and JVM via DoH.

override fun query(hostname: String, callback: AsyncDns.Callback) {
val executing = AtomicInteger(2)

resolver.query(
Copy link
Collaborator Author

@yschimke yschimke Feb 5, 2022

Choose a reason for hiding this comment

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

Split by type, otherwise the results are nicely ordered but combined.

Send a DNS query with the specified name and query type, get back a set of InetAddresses with rfc6724 sorting style asynchronously. The answer will be provided asynchronously through the provided Callback.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the first part of Happy Eyeballs ordering - which is helpfully useful.

First, the client MUST sort the addresses received up to this point using Destination Address Selection ([RFC6724], Section 6).

@yschimke
Copy link
Collaborator Author

@swankjesse Hey, I don't suggest changing your design for a future RFC (HTTPS records), but maybe worth considering how that would fit in, if we want to use the IPv4 and IPv6 address hints, or ALPN, HSTS, or AltSvc flags from the DNS phase.

@yschimke
Copy link
Collaborator Author

Half of this is now in #7157

@yschimke yschimke closed this Mar 12, 2022
@yschimke yschimke deleted the async_dns branch May 27, 2023 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant