[patch] allow socket_[gs]et_options() to work on streams

From: Date: Sat, 05 Mar 2011 15:19:31 +0000
Subject: [patch] allow socket_[gs]et_options() to work on streams
Groups: php.internals 
Request: Send a blank email to internals+get-51577@lists.php.net to get a copy of this message
Hi internals, The goal of this patch is to allow user handling of low level socket options for stream sockets created with stream_socket_*() or fsockopen() functions. I choose to extend the socket_get_options() and socket_set_options() functions and keep the functionality inside the sockets extension so this won't add seldom used "bloat" to streams if built without it. With the patch, these two functions check if their first argument is a stream, and then attempt to cast it to php_sock before trying to fetch it as a socket resource. Patch is here: http://si.kz/php-sockets-stream-options.diff.txt Anyone with karma care to comment / commit ? :) Regards, Vincent

« previous php.internals (#51577) next »