Re: fread() behaviour

From: Date: Thu, 20 Nov 2008 02:15:43 +0000
Subject: Re: fread() behaviour
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-283582@lists.php.net to get a copy of this message
Rene Fournier wrote:
So my question is, why does fread wait if there is nothing more to read? Shouldn't it return immediately? (That's what I want.) And as for the delay, it's there so that if the incoming data is a little slow, it has time to catch up with fread. Thanks. ...Rene
I do believe: No, because fread reads to EOF, which is not present. Just because there is no text being sent over the steam, does not mean EOF is present. I could be wrong, but that's the general idea if I recall correctly. - Craige

« previous php.general (#283582) next »