PowerTCP Telnet for .NET CF
NoDelay Property
See Also  Send comments on this topic.
Dart.Common Namespace > TcpSocketOption Class : NoDelay Property




Gets or sets a value that disables the use of Nagle's algorithm so that data is sent immediately.

Syntax

Visual Basic (Declaration) 
Public Property NoDelay As Boolean
Visual Basic (Usage)Copy Code
Dim instance As TcpSocketOption
Dim value As Boolean
 
instance.NoDelay = value
 
value = instance.NoDelay
C# 
public bool NoDelay {get; set;}
Managed Extensions for C++ 
public: __property bool get_NoDelay();
public: __property void set_NoDelay( 
   bool value
);
C++/CLI 
public:
property bool NoDelay {
   bool get();
   void set (    bool value);
}

Property Value

False if Nagle's algorithm is used; otherwise true. The default value is false.

Remarks

When small pieces of data (such as single bytes) are send many times consecutively, inefficient packets can be sent with one byte of useful data and 40 bytes of header information. Nagle's algorithm specifies that this type of data should be automatically concatenated and sent in a single packet. When true, Nagle's algorithm is defeated and data is immediately sent in a dedicated packet. When false, Nagle's algorithm is used and consecutive Socket Send calls might send data in a single (more efficient) packet.

Setting this property to true may result in a speed optimization (because packets are sent immediately, without having to wait to see if Send is called again). Setting this property to false results in data being transmitted more efficiently.

Requirements

Target Platforms: Microsoft .NET Framework 2.0

See Also

Documentation Version 4.2
© 2010 Dart Communications. All Rights Reserved.