ServicePointManager.DefaultPersistentConnectionLimit 欄位
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
連接到 HTTP/1.1 或更新伺服器的物件,允許 ServicePoint 的持久連線數(2)預設數值。 此欄位為常數,若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