Protocolswift-nio 2.81.0NIOPosix
Resolver
A protocol that covers an object that does DNS lookups.
protocol Resolver
Browse conforming typesIn general the rules for the resolver are relatively broad: there are no specific requirements on how it operates. However, the rest of the code assumes that it obeys RFC 6724, particularly section 6 on ordering returned addresses. That is, the IPv6 and IPv4 responses should be ordered by the destination address ordering rules from that RFC. This specification is widely implemented by getaddrinfo implementations, so any implementation based on getaddrinfo will work just fine. In the future, a custom resolver will need also to implement these sorting rules.