Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51588 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30697 invoked from network); 7 Mar 2011 09:18:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Mar 2011 09:18:29 -0000 Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 207.97.245.143 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.143 smtp143.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.143] ([207.97.245.143:43872] helo=smtp143.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 00/32-17187-3E2A47D4 for ; Mon, 07 Mar 2011 04:18:29 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp34.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id D0181380578; Mon, 7 Mar 2011 04:18:25 -0500 (EST) X-Virus-Scanned: OK Received: by smtp34.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 5ACD1380537; Mon, 7 Mar 2011 04:18:25 -0500 (EST) Message-ID: <4D74A2E0.3090304@sugarcrm.com> Date: Mon, 07 Mar 2011 01:18:24 -0800 Organization: SugarCRM User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.14) Gecko/20110221 Thunderbird/3.1.8 MIME-Version: 1.0 To: Gustavo Lopes CC: "internals@lists.php.net" References: <43.60.54597.484527D4@pb1.pair.com> <4D7436E8.7010802@sugarcrm.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [patch] allow socket_[gs]et_options() to work on streams From: smalyshev@sugarcrm.com (Stas Malyshev) Hi! >> I 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. 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. 227