ServicePointManager.UseNagleAlgorithm 屬性

定義

判斷由這個 ServicePointManager 物件所管理的服務點是否使用 Nagle 演算法。

public:
 static property bool UseNagleAlgorithm { bool get(); void set(bool value); };
public static bool UseNagleAlgorithm { get; set; }
static member UseNagleAlgorithm : bool with get, set
Public Shared Property UseNagleAlgorithm As Boolean

屬性值

true 表示使用 Nagle 演算法;否則為 false。 預設值是 true

範例

下列程式代碼範例會設定這個屬性。

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

備註

Nagle 演算法可用來緩衝小型數據封包,並將其傳輸為單一封包,以減少網路流量。 此程式也稱為「流覽」;它廣泛使用,因為它會減少傳輸的封包數目,並降低每個封包的額外負荷。

變更此屬性的值不會影響現有的 ServicePoint 物件。 只有在變更之後建立的新服務點才會受到影響。

Nagle 演算法會在 IETF RFC 896 中完整描述。

適用於

另請參閱