TcpClient.NoDelay プロパティ
アセンブリ: System (system.dll 内)

/** @property */ public boolean get_NoDelay () /** @property */ public void set_NoDelay (boolean value)
遅延が無効になっている場合は true。それ以外の場合は false。既定値は false です。

NoDelay が false の場合、TcpClient は十分な量の送信データが集まるまでネットワークにパケットを送信しません。TCP セグメントのオーバーヘッドの量に比較すると、少量のデータを送信することは非効率的です。ただし、ごく少量のデータを送信する必要がある場合や、送信した各パケットについてすぐに応答が要求される場合もあります。ネットワーク効率とアプリケーション要件の重要性を比較検討して判断してください。

遅延を無効にするコード例を次に示します。この例では、次に NoDelay の値をチェックしてプロパティが正常に設定されていることを検証します。
' Sends data immediately upon calling NetworkStream.Write. tcpClient.NoDelay = True ' Determines if the delay is enabled by using the NoDelay property. If tcpClient.NoDelay = True Then Console.WriteLine(("The delay was set successfully to " + tcpClient.NoDelay.ToString())) End If
// Sends data immediately upon calling NetworkStream.Write. tcpClient.NoDelay = true; // Determines if the delay is enabled by using the NoDelay property. if (tcpClient.NoDelay == true) Console.WriteLine ("The delay was set successfully to " + tcpClient.NoDelay.ToString ());
// Sends data immediately upon calling NetworkStream.Write. tcpClient->NoDelay = true; // Determines if the delay is enabled by using the NoDelay property. if ( tcpClient->NoDelay == true ) Console::WriteLine( "The delay was set successfully to {0}", tcpClient->NoDelay );
// Sends data immediately upon calling NetworkStream.Write. tcpClient.set_NoDelay(true); // Determines if the delay is enabled by using the NoDelay property. if (tcpClient.get_NoDelay() == true) { Console.WriteLine("The delay was set successfully to " + ((System.Boolean)tcpClient.get_NoDelay()).ToString()); }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からTcpClient.NoDelay プロパティを検索する場合は、下記のリンクをクリックしてください。

- TcpClient.NoDelay プロパティのページへのリンク