expiredDNSBehavior(_:)
Allow or prohibit the use of expired DNS answers during connection establishment.
Declaration
func expiredDNSBehavior(_ behavior: NWParameters.ExpiredDNSBehavior) -> SelfParameters
- behavior:
The expired DNS behavior to use.
Discussion
If allowed, a DNS answer that was previously returned may be re-used for new connections even after the answers are considered expired. A query for fresh answers will be sent in parallel, and the fresh answers will be used as alternate addresses in case the expired answers do not result in successful connections.
By default, this value is .systemDefault, which allows the system to determine if it is appropriate to use expired answers.