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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to