[php-src] Issue #14111: Add SO_LINGER option for streams
| From: | sezeryalcin | Date: | Thu, 02 May 2024 13:20:22 +0000 |
| Subject: | [php-src] Issue #14111: Add SO_LINGER option for streams | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246849@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/14111
Author: sezeryalcin
### Description
stream_context_set_option() function currently does not list/support socket layer SO_LINGER option.
Adding this, and probably any other socket options to streams will improve stream functionality.
$conn = @stream_socket_accept(9999, 0)
$stream_opts = [
'socket' => ['so_linger' => 0 ]
];
stream_context_set_option($conn, $stream_opts);