Skip to content

Commit b5568a0

Browse files
authored
GH-15440: adding CURLOPT_TCP_KEEPCNT constant (8.9.0) (#15446)
close GH-15446
1 parent bb0c325 commit b5568a0

File tree

5 files changed

+19
-1
lines changed

5 files changed

+19
-1
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ PHP NEWS
1717
As such, passing invalid types to exit/die may now result in a TypeError
1818
being thrown. (Girgias)
1919

20+
- CURL:
21+
. Added CURLOPT_TCP_KEEPCNT to set the number of probes to send before
22+
dropping the connection. (David Carlier)
23+
2024
- Hash:
2125
. Fix GH-15384 (Build fails on Alpine / Musl for amd64). (timwolla)
2226

UPGRADING

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,7 @@ PHP 8.4 UPGRADE NOTES
917917
- Curl:
918918
. CURL_HTTP_VERSION_3.
919919
. CURL_HTTP_VERSION_3ONLY.
920+
. CURL_TCP_KEEPCNT
920921

921922
- Intl:
922923
. The IntlDateFormatter class exposes now the new PATTERN constant

ext/curl/curl.stub.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,13 @@
407407
* @cvalue CURLOPT_STDERR
408408
*/
409409
const CURLOPT_STDERR = UNKNOWN;
410+
#if LIBCURL_VERSION_NUM >= 0x080900 /* Available since 8.9.0 */
411+
/**
412+
* @var int
413+
* @cvalue CURLOPT_TCP_KEEPCNT
414+
*/
415+
const CURLOPT_TCP_KEEPCNT = UNKNOWN;
416+
#endif
410417
/**
411418
* @var int
412419
* @cvalue CURLOPT_TELNETOPTIONS

ext/curl/curl_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.

ext/curl/interface.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,9 @@ static zend_result _php_curl_setopt(php_curl *ch, zend_long option, zval *zvalue
17281728
#if LIBCURL_VERSION_NUM >= 0x075700 /* Available since 7.87.0 */
17291729
case CURLOPT_CA_CACHE_TIMEOUT:
17301730
case CURLOPT_QUICK_EXIT:
1731+
#endif
1732+
#if LIBCURL_VERSION_NUM >= 0x080900 /* Available since 8.9.0 */
1733+
case CURLOPT_TCP_KEEPCNT:
17311734
#endif
17321735
lval = zval_get_long(zvalue);
17331736
if ((option == CURLOPT_PROTOCOLS || option == CURLOPT_REDIR_PROTOCOLS) &&

0 commit comments

Comments
 (0)