Re: Re: PHP 4.0 Bug #6038 Updated: fread() in non blocking mode cant't read more than 901120 bytes
| From: | Stanislav Malyshev | Date: | Mon, 14 Aug 2000 16:37:22 +0000 |
| Subject: | Re: Re: PHP 4.0 Bug #6038 Updated: fread() in non blocking mode cant't read more than 901120 bytes | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-28834@lists.php.net to get a copy of this message | ||
BH>> Basically i saw that fread() operations become slower and slower
BH>> the more bytes are read (at least when reading from a socket). I
BH>> send a mail to you and the list which demonstrates this.
That's natural - PHP reads data in chunks, as far as I see, so more the
data, slower the transfer.
BH>> was the result. The string contains only 10.02% percent of the date that
BH>> should be read and are read when in blocking mode.
No. It coontains 100% of the data that should be read. I repeat: in
non-blocking mode, the "data size" is the _maximum_ value, not _minimum_
value. That's the meaning of non-blocking - if there's not enough data,
don't block and wait but return immediately.
BH>> In non-blocking mode (as i understand this) fread does not wait
BH>> for data on the socket, in blocking mode fread is waiting.
Yes.
BH>> So my problem is, that the data is there, but its not read by fread().
So use looping fread or set it to the blocking mode.
--
Stanislav Malyshev stas@zend.com
+972-3-6139665 ext.106