Wez Furlong I am Wez Furlong, Chief Software Architect at Message Systems. We're responsible for building an awesome Messaging Platform.

I'm also a PHP Core developer and OpenSource contributor, residing in Maryland, USA with Juliette, Xander and Lily. (read more)

Subscribe. (circulation 957)
Comments. (circulation 8)

Search powered by Google

Slides: PHP Streams

3rd July 2008 @ 00:00 EDT

Here are the slides from my Streams talk; they cover a variety of bits and pieces of streams background and implementation that may or may not be useful to you.

SlideShare | View
by Wez Furlong in .
Post a comment

stream_set_timeout

3rd July 2008 @ 03:28 EDT

Hi Wez,

I am wondering about stream_set_timeout(). If I understand the purpose correctly it only controls the timeout until a connection is established, it does not however control how long the entire requests may take to complete. I guess this is my job to handle while reading the data chunks, but it would be nice to be able to define this on a stream level. It would make it much easier (and more performant) for PHP library authors to offer a maximum time for request completion.

stream_set_timeout is per operation

3rd July 2008 @ 09:26 EDT

Hi Lukas,

The timeout is per underlying IO syscall issued on the stream, so you get up to 60 seconds (the default) for connect, 60 seconds for the first underlying read call, 60 seconds for the next and so forth.

The streams layer could potentially be expanded to set an overall deadline for completion of (stream|file)_get_contents (where it seems most useful).

Post a comment

Would you like to work with me?
I have positions open for server/infrastructure software development (C) and QA.

Ohloh profile for wez