Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51594 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39991 invoked from network); 7 Mar 2011 09:51:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Mar 2011 09:51:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=smalyshev@sugarcrm.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=smalyshev@sugarcrm.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain sugarcrm.com designates 207.97.245.153 as permitted sender) X-PHP-List-Original-Sender: smalyshev@sugarcrm.com X-Host-Fingerprint: 207.97.245.153 smtp153.iad.emailsrvr.com Linux 2.6 Received: from [207.97.245.153] ([207.97.245.153:33420] helo=smtp153.iad.emailsrvr.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8A/14-17187-6AAA47D4 for ; Mon, 07 Mar 2011 04:51:35 -0500 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp55.relay.iad1a.emailsrvr.com (SMTP Server) with ESMTP id 6339D2E02A4; Mon, 7 Mar 2011 04:51:32 -0500 (EST) X-Virus-Scanned: OK Received: by smtp55.relay.iad1a.emailsrvr.com (Authenticated sender: smalyshev-AT-sugarcrm.com) with ESMTPSA id 07E042E04AF; Mon, 7 Mar 2011 04:51:31 -0500 (EST) Message-ID: <4D74AAA3.9020307@sugarcrm.com> Date: Mon, 07 Mar 2011 01:51:31 -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> <4D74A2E0.3090304@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 suppose this information could be queried, but would you want to do the > cast and retrieve this data in every call say in a socket_read loop? I'd ask why you need socket_read and not just fread if you use streams? If you need deeper semantics, then yes, either you use resources or you convert. I'm not against the conversion function, per se, but the regular API shouldn't force it's use (see below). > I also don't think magically mixing PHP streams and socket resources is a > good idea, users may start to think PHP streams and socket resources are > interchangeable and will be (even more) confused when they can't use > socket resources with the stream functions. We don't have alternative to setting socket options on a stream. Neither we want one - why have two functions for doing the same thing? -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/ (408)454-6900 ext. 227