|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-12-31 09:52 UTC] corinl at gmx dot de
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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 05 23:00:01 2025 UTC |
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); }