Skip to content

Commit 1f4830f

Browse files
devnexencmb69
authored andcommitted
Add TCP_NOTSENT_LOWAT socket option
Can be used to limit the amount of unsent data per socket. Closes GH-8559.
1 parent c8c470a commit 1f4830f

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ PHP NEWS
4949
. Fixed bug GH-7787 (Improve session write failure message for user error
5050
handlers). (ilutov)
5151

52+
- Sockets:
53+
. Added TCP_NOTSENT_LOWAT socket option. (David Carlier)
54+
5255
- Sodium:
5356
. Added sodium_crypto_stream_xchacha20_xor_ic(). (Scott)
5457

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ PHP 8.2 UPGRADE NOTES
203203

204204
- Sockets:
205205
. SO_INCOMING_CPU
206+
. TCP_NOTSENT_LOWAT
206207

207208
========================================
208209
11. Changes to INI File Handling

ext/sockets/sockets.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,9 @@ static PHP_MINIT_FUNCTION(sockets)
553553
#ifdef TCP_NODELAY
554554
REGISTER_LONG_CONSTANT("TCP_NODELAY", TCP_NODELAY, CONST_CS | CONST_PERSISTENT);
555555
#endif
556+
#ifdef TCP_NOTSENT_LOWAT
557+
REGISTER_LONG_CONSTANT("TCP_NOTSENT_LOWAT", TCP_NOTSENT_LOWAT, CONST_CS | CONST_PERSISTENT);
558+
#endif
556559
#ifdef TCP_DEFER_ACCEPT
557560
REGISTER_LONG_CONSTANT("TCP_DEFER_ACCEPT", TCP_DEFER_ACCEPT, CONST_CS | CONST_PERSISTENT);
558561
#endif

0 commit comments

Comments
 (0)