Skip to content

Commit 8290849

Browse files
Merge pull request #1065 from c-cube/simon/lwt-io-socket-options-doc
add doc for set_tcp_nodelay in Lwt_io
2 parents 5349dd2 + 33920df commit 8290849

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

CHANGES

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
===== 5.10.0 =====
2+
3+
====== Misc
4+
5+
* In `Lwt_io`, functions that create sockets gain new options `?set_tcp_nodelay` and `?prepare_fd`. (#1061, Simon Cruanes)
6+
7+
* Breaking change: `?set_tcp_nodelay` is set to `true` by default which means TCP_NODELAY is now set by default for such functions. (#1061, Simon Cruanes)
8+
19
===== 5.9.2 =====
210

311
====== Packaging ======

src/unix/lwt_io.mli

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,12 @@ val open_connection :
573573
@raise Unix.Unix_error on error.
574574
575575
@param set_tcp_nodelay if true, [TCP_NODELAY] is set on the socket FD. This
576-
avoids a surprising 40ms delay in some situations.
576+
avoids a surprising 40ms delay in some situations. It disables
577+
Nagle's algorithm (https://en.wikipedia.org/wiki/Nagle%27s_algorithm).
577578
See for example https://brooker.co.za/blog/2024/05/09/nagle.html for why.
578579
580+
The default value is [true].
581+
579582
@param prepare_fd is a custom callback that can be used to modify the socket FD
580583
before it is turned into high level channels.
581584

0 commit comments

Comments
 (0)