Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51587 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29414 invoked from network); 7 Mar 2011 09:15:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Mar 2011 09:15:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=glopes@nebm.ist.utl.pt; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=glopes@nebm.ist.utl.pt; sender-id=unknown Received-SPF: error (pb1.pair.com: domain nebm.ist.utl.pt from 193.136.128.21 cause and error) X-PHP-List-Original-Sender: glopes@nebm.ist.utl.pt X-Host-Fingerprint: 193.136.128.21 smtp1.ist.utl.pt Linux 2.6 Received: from [193.136.128.21] ([193.136.128.21:41551] helo=smtp1.ist.utl.pt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A5/E1-17187-022A47D4 for ; Mon, 07 Mar 2011 04:15:13 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp1.ist.utl.pt (Postfix) with ESMTP id 1BBD4700044A for ; Mon, 7 Mar 2011 09:15:09 +0000 (WET) X-Virus-Scanned: by amavisd-new-2.6.4 (20090625) (Debian) at ist.utl.pt Received: from smtp1.ist.utl.pt ([127.0.0.1]) by localhost (smtp1.ist.utl.pt [127.0.0.1]) (amavisd-new, port 10025) with LMTP id yiUPh4t058KP for ; Mon, 7 Mar 2011 09:15:08 +0000 (WET) Received: from mail2.ist.utl.pt (mail.ist.utl.pt [IPv6:2001:690:2100:1::8]) by smtp1.ist.utl.pt (Postfix) with ESMTP id D6FC97000438 for ; Mon, 7 Mar 2011 09:15:08 +0000 (WET) Received: from clk-0081.clk-domain (unknown [85.139.253.17]) (Authenticated sender: ist155741) by mail2.ist.utl.pt (Postfix) with ESMTPSA id C34EB2008639 for ; Mon, 7 Mar 2011 09:15:08 +0000 (WET) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "internals@lists.php.net" References: <43.60.54597.484527D4@pb1.pair.com> <4D7436E8.7010802@sugarcrm.com> Date: Mon, 07 Mar 2011 09:15:08 -0000 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Organization: =?utf-8?Q?N=C3=BAcleo_de_Eng=2E_Biom=C3=A9di?= =?utf-8?Q?ca_do_I=2ES=2ET=2E?= Message-ID: In-Reply-To: <4D7436E8.7010802@sugarcrm.com> User-Agent: Opera Mail/11.01 (Win32) Subject: Re: [PHP-DEV] [patch] allow socket_[gs]et_options() to work on streams From: glopes@nebm.ist.utl.pt ("Gustavo Lopes") Em Mon, 07 Mar 2011 01:37:44 -0000, Stas Malyshev escreveu: >> I 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? 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 Lopes