mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
ext/sockets: adding Linux's TCP_SYNCNT constant.
Useful to control how many SYN packets the client will send to the server before giving up establishing a connection if the server does not respond (usually 5 or 6 by default). Close GH-13816
This commit is contained in:
parent
4bc7ea3437
commit
b82024b13c
4 changed files with 14 additions and 1 deletions
2
NEWS
2
NEWS
|
@ -180,6 +180,8 @@ PHP NEWS
|
|||
|
||||
- Sockets:
|
||||
. Added multicast group support for ipv4 on FreeBSD. (jonathan@tangential.ca)
|
||||
. Added the TCP_SYNCNT constant for Linux to set number of attempts to send
|
||||
SYN packets from the client. (David Carlier)
|
||||
|
||||
- SNMP:
|
||||
. Removed the deprecated inet_ntoa call support. (David Carlier)
|
||||
|
|
|
@ -556,6 +556,7 @@ PHP 8.4 UPGRADE NOTES
|
|||
. SO_EXCLUSIVEADDRUSE (Windows only).
|
||||
. SOCK_CONN_DGRAM (NetBSD only).
|
||||
. SOCK_DCCP (NetBSD only).
|
||||
. TCP_SYNCNT (Linux only).
|
||||
|
||||
- Sodium:
|
||||
. SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES
|
||||
|
|
|
@ -544,6 +544,13 @@ const SKF_AD_MAX = UNKNOWN;
|
|||
*/
|
||||
const TCP_CONGESTION = UNKNOWN;
|
||||
#endif
|
||||
#ifdef TCP_SYNCNT
|
||||
/**
|
||||
* @var int
|
||||
* @cvalue TCP_SYNCNT
|
||||
*/
|
||||
const TCP_SYNCNT = UNKNOWN;
|
||||
#endif
|
||||
#ifdef SO_ZEROCOPY
|
||||
/**
|
||||
* @var int
|
||||
|
|
5
ext/sockets/sockets_arginfo.h
generated
5
ext/sockets/sockets_arginfo.h
generated
|
@ -1,5 +1,5 @@
|
|||
/* This is a generated file, edit the .stub.php file instead.
|
||||
* Stub hash: a99144c7c83a3f06e54a01bc21c0d30c9a21be29 */
|
||||
* Stub hash: c761db0839535812316a42200f68c7db22639d81 */
|
||||
|
||||
ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE)
|
||||
ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1)
|
||||
|
@ -535,6 +535,9 @@ static void register_sockets_symbols(int module_number)
|
|||
#if defined(TCP_CONGESTION)
|
||||
REGISTER_LONG_CONSTANT("TCP_CONGESTION", TCP_CONGESTION, CONST_PERSISTENT);
|
||||
#endif
|
||||
#if defined(TCP_SYNCNT)
|
||||
REGISTER_LONG_CONSTANT("TCP_SYNCNT", TCP_SYNCNT, CONST_PERSISTENT);
|
||||
#endif
|
||||
#if defined(SO_ZEROCOPY)
|
||||
REGISTER_LONG_CONSTANT("SO_ZEROCOPY", SO_ZEROCOPY, CONST_PERSISTENT);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue