This documentation is archived and is not being maintained.

ServicePoint.UseNagleAlgorithm Property

Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.

Gets or sets a Boolean value that determines whether the Nagle algorithm is used on connections managed by this ServicePoint.

[Visual Basic]
Public Property UseNagleAlgorithm As Boolean
public bool UseNagleAlgorithm {get; set;}
public: __property bool get_UseNagleAlgorithm();
public: __property void set_UseNagleAlgorithm(bool);
public function get UseNagleAlgorithm() : Boolean;
public function set UseNagleAlgorithm(Boolean);

Property Value

true to use nagling; otherwise false. The default value is true.


The Nagle algorithm is used to reduce network traffic by buffering small packets of data and transmitting them as a single packet. This process is called nagling; it is widely used because it reduces the number of packets transmitted, and lowers the overhead per packet.

Changing the value of this property does not affect existing connections. Only new connections created after the change are affected.

The Nagle algorithm is fully described in IETF RFC 896.


[Visual Basic, C#, C++] The following example displays the value of this property.

[Visual Basic] 

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

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


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

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ServicePoint Class | ServicePoint Members | System.Net Namespace