DnsOptions.StaleDnsOptions.Builder.SetUseStaleOnNameNotResolved Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets whether to allow use of stale DNS results when network resolver fails to resolve the hostname.
[Android.Runtime.Register("setUseStaleOnNameNotResolved", "(I)Landroid/net/http/DnsOptions$StaleDnsOptions$Builder;", "", ApiSince=34)]
public Android.Net.Http.DnsOptions.StaleDnsOptions.Builder SetUseStaleOnNameNotResolved(Android.Net.Http.DnsOption state);
[<Android.Runtime.Register("setUseStaleOnNameNotResolved", "(I)Landroid/net/http/DnsOptions$StaleDnsOptions$Builder;", "", ApiSince=34)>]
member this.SetUseStaleOnNameNotResolved : Android.Net.Http.DnsOption -> Android.Net.Http.DnsOptions.StaleDnsOptions.Builder
Parameters
- state
- DnsOption
one of the DNS_OPTION_* values. Value is one of the following: DnsOptions.DNS_OPTION_UNSPECIFIED; DnsOptions.DNS_OPTION_ENABLED; DnsOptions.DNS_OPTION_DISABLED
Returns
the builder for chaining. This value cannot be null.
- Attributes
Remarks
Sets whether to allow use of stale DNS results when network resolver fails to resolve the hostname.
Depending on the use case, if the DNS resolver quickly sees a fresh failure, it may be desirable to use the failure as it is technically the fresher result, and we had such a fresh result quickly; or, prefer having any result (even if stale) to use over dealing with a DNS failure.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.