ServicePointManager.DefaultPersistentConnectionLimit 欄位
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
預設的持續連線數目 (2),是連接至 HTTP/1.1 (含) 以後版本伺服器之 ServicePoint 物件上所允許的連線數目。 這個欄位是常數,如果尚未直接或透過組態設定 DefaultConnectionLimit 屬性的值,則會使用此欄位初始化 DefaultConnectionLimit 屬性。
public: int DefaultPersistentConnectionLimit = 2;
public const int DefaultPersistentConnectionLimit = 2;
val mutable DefaultPersistentConnectionLimit : int
Public Const DefaultPersistentConnectionLimit As Integer = 2
欄位值
Value = 2範例
下列程式代碼範例會 DefaultConnectionLimit 使用此欄位來設定 屬性。
ServicePointManager::UseNagleAlgorithm = true;
ServicePointManager::Expect100Continue = true;
ServicePointManager::CheckCertificateRevocationList = true;
ServicePointManager::DefaultConnectionLimit = ServicePointManager::DefaultPersistentConnectionLimit;
ServicePointManager.UseNagleAlgorithm = true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.CheckCertificateRevocationList = true;
ServicePointManager.DefaultConnectionLimit = ServicePointManager.DefaultPersistentConnectionLimit;
ServicePointManager.UseNagleAlgorithm = True
ServicePointManager.Expect100Continue = True
ServicePointManager.CheckCertificateRevocationList = True
ServicePointManager.DefaultConnectionLimit = _
ServicePointManager.DefaultPersistentConnectionLimit