次の方法で共有


ServicePointManager.UseNagleAlgorithm プロパティ

メモ : この名前空間、クラス、およびメンバは、.NET Framework Version 1.1 だけでサポートされています。

新しいサービス ポイントで Nagle アルゴリズムを使用するかどうかを決定する Boolean 値を取得または設定します。

Public Shared Property UseNagleAlgorithm As Boolean
[C#]
public static bool UseNagleAlgorithm {get; set;}
[C++]
public: __property static bool get_UseNagleAlgorithm();public: __property static void set_UseNagleAlgorithm(bool);
[JScript]
public static function get UseNagleAlgorithm() : Boolean;public static function set UseNagleAlgorithm(Boolean);

プロパティ値

Nagle アルゴリズムを使用する場合は true 。それ以外の場合は false 。既定値は true です。

解説

Nagle アルゴリズムは、複数の小さなデータ パケットをバッファに入れて、単一のパケットとして送信することにより、ネットワーク トラフィックを減らすために使用されます。このプロセスはナグリングと呼ばれます。送信するパケット数を減らしてパケット単位のオーバーヘッドを削減できるので、ナグリングは広く利用されています。

このプロパティの値を変更しても、既存のサービス ポイントには影響しません。変更後に作成された新しいサービス ポイントだけに影響します。

Nagle アルゴリズムの詳細については、IETF RFC 896 を参照してください。

使用例

[Visual Basic, C#, C++] このプロパティを設定する例を次に示します。

 
ServicePointManager.UseNagleAlgorithm = True
ServicePointManager.Expect100Continue = True
ServicePointManager.CheckCertificateRevocationList = True
ServicePointManager.DefaultConnectionLimit = _
    ServicePointManager.DefaultPersistentConnectionLimit

[C#] 
ServicePointManager.UseNagleAlgorithm = true;
ServicePointManager.Expect100Continue = true;
ServicePointManager.CheckCertificateRevocationList = true;
ServicePointManager.DefaultConnectionLimit = ServicePointManager.DefaultPersistentConnectionLimit;

[C++] 
ServicePointManager::UseNagleAlgorithm = true;
ServicePointManager::Expect100Continue = true;
ServicePointManager::CheckCertificateRevocationList = true;
ServicePointManager::DefaultConnectionLimit = ServicePointManager::DefaultPersistentConnectionLimit;

[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン 言語のフィルタ をクリックします。

必要条件

プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ

参照

ServicePointManager クラス | ServicePointManager メンバ | System.Net 名前空間