Add curl_multi_fdset to PHP cURL extension
オープン
@krakjoe がすでに取り組んでいます。
2025年8月30日 から。
Extension: curl
Feature
Status: Verified
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 13時間
- マージ済み PR(30日)
- 96
説明
Description
The binding for curl_multi_fdset() (available in libcurl C API) is missing.
This creates a limitation:
- In libcurl (C), developers can extract the underlying sockets and integrate them into a single event loop with other file descriptors (e.g. database sockets, custom UDP/TCP sockets, message queues, etc.) using select(), poll(), or epoll().
- In PHP, it is not possible: we only have curl_multi_select(), which is isolated and works exclusively for cURL sockets.
Many PHP applications combine multiple asynchronous sources:
- HTTP requests via cURL multi-handle
- Database connections (PostgreSQL via pg_socket())
- Custom sockets (e.g. UDP for inter-process communication)
Proposed:
curl_multi_fdset(CurlMultiHandle $mh, array &$read, array &$write, array &$except): int
Where:
$read, $write, $except are arrays of PHP stream resources corresponding to the fds returned by libcurl.
Return value is the max_fd (as in libcurl).
Example:
$read = [$pg_socket, $udp_socket];
$write = [];
$except = [];
curl_multi_fdset($mh, $read, $write, $except);
stream_select($read, $write, $except, $timeout);
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
評価
この issue はまだ評価されていません。