ID:               21313
 User updated by:  [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: linux+apache
 PHP Version:      4.3.0
 New Comment:

well, i use it in a chat script. the output most often is only a few
hundret bytes, flushed about every second. it seems that sometimes (may
be when the client disconnected) the flush 'hangs' (flush takes between
300-1500) seconds. it would be good to have a command like bool
flush(int timeout), so the chat client could be kicked if flush would
take longer than say 30 seconds.
my loop looks like
while (!connection_aborted() && !$do_end)
{
...
flush();
usleep(0.75*1000000);
}


Previous Comments:
------------------------------------------------------------------------

[2002-12-31 10:17:51] [EMAIL PROTECTED]

it doesn't make sense for flush() to timeout, since it's purpose is to
ensure that the output has been sent.
You just need to flush more often in your scripts if you are really
having to wait 100 seconds for flush to complete.
Just as a sanity check, when it takes 100 seconds, how much data are
you outputting from the page?

------------------------------------------------------------------------

[2002-12-31 09:52:15] [EMAIL PROTECTED]

Hi,
i noticed that flush() sometimes takes a lot of time (> 100 seconds!),
so woulnd't it be a good idea to add a timeout to flush? Would be
really helpful sometimes, for example for a chat etc...
Thanks,
Corin

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=21313&edit=1

Reply via email to