Re: [patch] allow socket_[gs]et_options() to work on streams
| From: | Stas Malyshev | Date: | Mon, 07 Mar 2011 09:18:24 +0000 |
| Subject: | Re: [patch] allow socket_[gs]et_options() to work on streams | ||
| References: | 1 2 3 4 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-51588@lists.php.net to get a copy of this message | ||
Hi!
Let socket functions deal with it - just see if it's a stream, use AS_SOCKETD on it. They don't really need resource, they just need FD - they'll get it one way or another. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227I think we already have PHP_STREAM_AS_SOCKETD, which should be appropriate here, not?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.