CURL.SetOptionTCPNoDelay
------------------------

Sets the TCP delay option.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [2.5](newinversion25.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionTCPNoDelay"; curl; Value ) 

**MBS**( **"CURL.SetOptionTCPNoDelay";** /\* Sets the TCP delay option. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* The new setting.e.g. 1 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | The new setting. | 1 |

### Result

Returns "OK" on success.

### Description

Sets the TCP delay option.  
Pass a number specifying whether the TCP\_NODELAY option should be set or cleared (1 = set, 0 = clear). The option is cleared by default. This will have no effect after the connection has been established.  
  
Setting this option will disable TCP's Nagle algorithm. The purpose of this algorithm is to try to minimize the number of small packets on the network (where "small packets" means TCP segments less than the Maximum Segment Size (MSS) for the network).  
  
Maximizing the amount of data sent per TCP segment is good because it amortizes the overhead of the send. However, in some cases (most notably telnet or rlogin) small segments may need to be sent without delay. This is less efficient than sending larger amounts of data at a time, and can contribute to congestion on the network if overdone.  
See also [TCP\_NODELAY](https://curl.haxx.se/libcurl/c/CURLOPT_TCP_NODELAY.html) option in CURL manual.

Created 18th August 2014 , last changed 18th August 2014

  
[CURL.SetOptionTCPKeepInterval](CURLSetOptionTCPKeepInterval.md) - [CURL.SetOptionTFTPBlockSize](CURLSetOptionTFTPBlockSize.md)

[HTML Version](CURLSetOptionTCPNoDelay.shtml)