ServicePointManager.DnsRefreshTimeout Vlastnost

Definice

Získá nebo nastaví hodnotu, která označuje, jak dlouho je překlad dns (Domain Name Service) považován za platný.

public:
 static property int DnsRefreshTimeout { int get(); void set(int value); };
public static int DnsRefreshTimeout { get; set; }
static member DnsRefreshTimeout : int with get, set
Public Shared Property DnsRefreshTimeout As Integer

Hodnota vlastnosti

Hodnota časového limitu v milisekundách Hodnota -1 označuje nekonečné období časového limitu. Výchozí hodnota je 120 000 milisekund (dvě minuty).

Příklady

Následující příklad kódu nastaví tuto vlastnost.

ServicePointManager::UseNagleAlgorithm = true;
ServicePointManager::Expect100Continue = true;
ServicePointManager::CheckCertificateRevocationList = true;
ServicePointManager::DefaultConnectionLimit =
    ServicePointManager::DefaultPersistentConnectionLimit;
ServicePointManager::EnableDnsRoundRobin = true;
ServicePointManager::DnsRefreshTimeout = 4*60*1000; // 4 minutes
ServicePointManager.UseNagleAlgorithm = true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.CheckCertificateRevocationList = true;
ServicePointManager.DefaultConnectionLimit = ServicePointManager.DefaultPersistentConnectionLimit;
ServicePointManager.EnableDnsRoundRobin = true;
ServicePointManager.DnsRefreshTimeout = 4*60*1000; // 4 minutes
ServicePointManager.UseNagleAlgorithm = True
ServicePointManager.Expect100Continue = True
ServicePointManager.CheckCertificateRevocationList = True
ServicePointManager.DefaultConnectionLimit = _
    ServicePointManager.DefaultPersistentConnectionLimit
ServicePointManager.EnableDnsRoundRobin = True
ServicePointManager.DnsRefreshTimeout = 4*60*1000

Platí pro

Viz také