Re: PHP 4.0 Bug #6038 Updated: fread() in non blocking mode cant't read more than 901120 bytes

From: Date: Mon, 14 Aug 2000 16:33:37 +0000
Subject: 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-28833@lists.php.net to get a copy of this message
* "Bug Database" <php-dev@lists.php.net> wrote: | Well, I didn't exactly see what's the problem here. | It works OK for me in blocking mode. | In non-blocking, you are basically saying "give me | anything from there but no more than X bytes", not | "give me X bytes", so it does. So please xplain more | in detail what's the problem. Basically i saw that fread() operations become slower and slower the more bytes are read (at least when reading from a socket). I send a mail to you and the list which demonstrates this. Then i tried to set blocking mode to false and, to quote myself: | ------------------------------------------------------- | Blocking: false | Blocksize: 1048576 bytes | | 1048576 bytes read ( 32.06%). duration: 1.19 seconds | 1048576 bytes read ( 64.11%). duration: 0.09 seconds | 1048576 bytes read ( 96.17%). duration: 0.09 seconds | 1048576 bytes read (100.00%). duration: -0.88 seconds | | strlen(): 327680 bytes (10.02%) | ------------------------------------------------------- was the result. The string contains only 10.02% percent of the date that should be read and are read when in blocking mode. In non-blocking mode (as i understand this) fread does not wait for data on the socket, in blocking mode fread is waiting. So my problem is, that the data is there, but its not read by fread(). (This is the problem besides the fact, that fread() get slower and slower as told above). regards, -- Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://www.bjoernsworld.de am Badedeich 7 · Telefon: +49(0)4667/981ASK · http://bjoern.hoehrmann.de 25899 Dagebüll · PGP KeyID: 0xA4357E78 · http://learn.to/quote +{i} ·---------------------------------<²³>---------------------------------·

« previous php.dev (#28833) next »