Re: [patch] allow socket_[gs]et_options() to work on streams
| From: | Gustavo Lopes | Date: | Mon, 07 Mar 2011 09:15:08 +0000 |
| Subject: | Re: [patch] allow socket_[gs]et_options() to work on streams | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51587@lists.php.net to get a copy of this message | ||
Em Mon, 07 Mar 2011 01:37:44 -0000, Stas Malyshev <smalyshev@sugarcrm.com> escreveu:
That will indeed give you a socket descriptor, but 1) it's not directly available to user-space. 2) you still have to create a socket extension resource in order to pass it to functions of that extension. -- Gustavo LopesI think a better option would be a function to convert a php socket stream into a socket resource. That would avoid limiting this to socket_get_options/socket_set_options and polluting the socket ext functions prologue with these conversions.I think we already have PHP_STREAM_AS_SOCKETD, which should be appropriate here, not?