Skip to content

Commit

Permalink
chore(types): update comment on HostResolver.resolveAddress (#4430)
Browse files Browse the repository at this point in the history
  • Loading branch information
Steven Yuan authored Feb 13, 2023
1 parent 2d89320 commit 3c353fb
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/types/src/dns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,16 @@ export interface HostResolverArguments {
*/
export interface HostResolver {
/**
* Resolves the address(es) for {@link HostResolverArguments}. Calls to this
* function will likely alter the cache (if implemented) so that if there's
* multiple addresses, a different set will be returned on the next call.
* Resolves the address(es) for {@link HostResolverArguments} and returns a
* list of addresses with (most likely) two addresses, one {@link HostAddressType.AAAA}
* and one {@link HostAddressType.A}. Calls to this function will likely alter
* the cache (if implemented) so that if there's multiple addresses, a different
* set will be returned on the next call.
* In the case of multi-answer, still only a maximum of two records should be
* returned. The resolver implementation is responsible for caching and rotation
* of the multiple addresses that get returned.
* Implementations don't have to explictly call getaddrinfo(), they can use
* high level abstractions provided in their language runtimes/libraries.
* @param args arguments with host name query addresses for
* @returns promise with a list of {@link HostAddress}
*/
Expand Down

0 comments on commit 3c353fb

Please sign in to comment.