This documentation is archived and is not being maintained.

ServicePointManager.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 by new service points.

[Visual Basic]
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);

Property Value

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

Remarks

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 servicepoints. Only new service points created after the change are affected.

The Nagle algorithm is fully described in IETF RFC 896.

Example

[Visual Basic, C#, C++] The following example sets this property.

[Visual Basic] 
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] 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.

Requirements

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

ServicePointManager Class | ServicePointManager Members | System.Net Namespace

Show: