共用方式為


ServicePointManager.DefaultPersistentConnectionLimit 欄位

定義

預設的持續連線數目 (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

適用於