php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6038 fread() in non blocking mode cant't read more than 901120 bytes
Submitted: 2000-08-09 01:24 UTC Modified: 2000-09-03 19:44 UTC
From: php-bugs at bjoernsworld dot de Assigned:
Status: Closed Package: Misbehaving function
PHP Version: 4.0.1pl2 OS: Winnt 4.0 SP 4
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php-bugs at bjoernsworld dot de
New email:
PHP Version: OS:

 

 [2000-08-09 01:24 UTC] php-bugs at bjoernsworld dot de
socket_set_blocking($sock, false);
$data = fread($sock, 13453592);
print strlen($data);

The stream is exactly 13453592 bytes long and can "easily" be read in blocking mode.

"easily" means that fread() takes about 4 _minutes_ to read the data where e.g. telnet or other tools needs 4 _seconds_.

The stream is a HTTP connection.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-08-14 11:35 UTC] stas@php.net
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.
 [2000-09-03 19:44 UTC] sniper@php.net
No feedback. Closed.

--Jani
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu May 02 13:01:30 2024 UTC