|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-07-21 04:23 UTC] sas at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 07 08:00:02 2026 UTC |
This problem has existed since about 3.0.9. It's supposedly been fixed in one way or another, but it keeps cropping up... consistantly. What I'm doing is attempting to read data from a socket using the following methodology: while (!feof($this->socket)){ $buffer .= fread( $this->socket, 1); } What happens is that php hangs for exactly 16 seconds every single time. Even if I just do a: $buffer = fread( $this->socket, 1024); it also hangs for the same amount of time. But... if I try to read a number of bytes less than or equal to the number of bytes available, it returns instantly with the data from the socket: $buffer = fread( $this->socket, 2);