Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27993 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 61250 invoked by uid 1010); 10 Feb 2007 22:43:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 61195 invoked from network); 10 Feb 2007 22:43:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Feb 2007 22:43:42 -0000 Authentication-Results: pb1.pair.com header.from=maurice@iceblog.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=maurice@iceblog.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain iceblog.de from 217.160.111.22 cause and error) X-PHP-List-Original-Sender: maurice@iceblog.de X-Host-Fingerprint: 217.160.111.22 p15097164.pureserver.info Received: from [217.160.111.22] ([217.160.111.22:58312] helo=p15097164.pureserver.info) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4D/04-26929-79A4EC54 for ; Sat, 10 Feb 2007 17:43:35 -0500 Received: (qmail 3152 invoked by uid 89); 10 Feb 2007 22:43:30 -0000 Received: from i3ed6c20e.versanet.de (HELO ?192.168.178.20?) (moritz@mertinkat.net@62.214.194.14) by p15097164.pureserver.info with SMTP; 10 Feb 2007 22:43:30 -0000 Message-ID: <45CE4A92.2080409@iceblog.de> Date: Sat, 10 Feb 2007 23:43:30 +0100 User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: Wez Furlong CC: internals@lists.php.net References: <45CB2D6E.1020804@iceblog.de> <4e89b4260702100604v77955573o63eb416d87b01ad2@mail.gmail.com> In-Reply-To: <4e89b4260702100604v77955573o63eb416d87b01ad2@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Moving Socket extension to PECL From: maurice@iceblog.de (Maurice) Hi once again, >> In my first tests I also included support for streams (using >> stream_select) in order to support SSL/TLS enabled connections. However, >> the SSL transport layer in the Stream "extension" is totally screwed up >> if you use asynchronous socket streams. > > That's the first I've heard about this; I've been using it in this > fashion successfully > for some time. Don't have time for a test case right now; but I've checked the code and remembered (parts of) the problem: 1) If you're using non-blocking SSL streams then fread sometimes returns int(0) which actually means SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE. 2) stream_select() returns write and read arrays for the async. SSL stream even if there's no user data (but SSL protocol data). For a quick example, just have a look at your own code (add SSL): guru-multiplexing.php @http://www.php.net/~wez/guru-multiplexing.tgz (and don't forget STREAM_CLIENT_CONNECT in stream_client_connect ;-) Maurice.