Skip to content

Commit b82024b

Browse files
committed
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
1 parent 4bc7ea3 commit b82024b

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ PHP NEWS
180180

181181
- Sockets:
182182
. Added multicast group support for ipv4 on FreeBSD. (jonathan@tangential.ca)
183+
. Added the TCP_SYNCNT constant for Linux to set number of attempts to send
184+
SYN packets from the client. (David Carlier)
183185

184186
- SNMP:
185187
. Removed the deprecated inet_ntoa call support. (David Carlier)

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ PHP 8.4 UPGRADE NOTES
556556
. SO_EXCLUSIVEADDRUSE (Windows only).
557557
. SOCK_CONN_DGRAM (NetBSD only).
558558
. SOCK_DCCP (NetBSD only).
559+
. TCP_SYNCNT (Linux only).
559560

560561
- Sodium:
561562
. SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES

ext/sockets/sockets.stub.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,13 @@
544544
*/
545545
const TCP_CONGESTION = UNKNOWN;
546546
#endif
547+
#ifdef TCP_SYNCNT
548+
/**
549+
* @var int
550+
* @cvalue TCP_SYNCNT
551+
*/
552+
const TCP_SYNCNT = UNKNOWN;
553+
#endif
547554
#ifdef SO_ZEROCOPY
548555
/**
549556
* @var int

ext/sockets/sockets_arginfo.h

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)