次の方法で共有


ServicePoint.UseNagleAlgorithm プロパティ

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

その ServicePoint が管理する接続で Nagle アルゴリズムを使用するかどうかを決定する Boolean 値を取得または設定します。

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

プロパティ値

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

解説

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

このプロパティの値を変更しても、既存の接続には影響しません。変更後に作成された新しい接続だけに影響します。

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

使用例

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

 

    Console.WriteLine("UseNagleAlgorithm = " + sp.UseNagleAlgorithm.ToString())
    Console.WriteLine("Expect 100-continue = " + sp.Expect100Continue.ToString())

[C#] 
Console.WriteLine ("UseNagleAlgorithm = " + sp.UseNagleAlgorithm.ToString ());
Console.WriteLine ("Expect 100-continue = " + sp.Expect100Continue.ToString ());

[C++] 

    Console::WriteLine(S"UseNagleAlgorithm = {0} ", sp->UseNagleAlgorithm.ToString());
    Console::WriteLine(S"Expect 100-continue = {0}", sp->Expect100Continue.ToString());

[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 ファミリ

参照

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