Add TCP_NOTSENT_LOWAT socket option

Can be used to limit the amount of unsent data per socket.

Closes GH-8559.
This commit is contained in:
David Carlier 2022-05-15 17:43:20 +01:00 committed by Christoph M. Becker
parent c8c470a100
commit 1f4830f21a
No known key found for this signature in database
GPG Key ID: D66C9593118BCCB6
3 changed files with 7 additions and 0 deletions

3
NEWS
View File

@ -49,6 +49,9 @@ PHP NEWS
. Fixed bug GH-7787 (Improve session write failure message for user error
handlers). (ilutov)
- Sockets:
. Added TCP_NOTSENT_LOWAT socket option. (David Carlier)
- Sodium:
. Added sodium_crypto_stream_xchacha20_xor_ic(). (Scott)

View File

@ -203,6 +203,7 @@ PHP 8.2 UPGRADE NOTES
- Sockets:
. SO_INCOMING_CPU
. TCP_NOTSENT_LOWAT
========================================
11. Changes to INI File Handling

View File

@ -553,6 +553,9 @@ static PHP_MINIT_FUNCTION(sockets)
#ifdef TCP_NODELAY
REGISTER_LONG_CONSTANT("TCP_NODELAY", TCP_NODELAY, CONST_CS | CONST_PERSISTENT);
#endif
#ifdef TCP_NOTSENT_LOWAT
REGISTER_LONG_CONSTANT("TCP_NOTSENT_LOWAT", TCP_NOTSENT_LOWAT, CONST_CS | CONST_PERSISTENT);
#endif
#ifdef TCP_DEFER_ACCEPT
REGISTER_LONG_CONSTANT("TCP_DEFER_ACCEPT", TCP_DEFER_ACCEPT, CONST_CS | CONST_PERSISTENT);
#endif