Home » Networking » Net_Server » Bug #1787
onIdle() Handler
Details
| Request #1787 | onIdle() Handler |
|---|---|
| Submitted | 2004-07-04 21:49 UTC |
| From | Progman2002 at gmx dot de |
| Assigned | cweiske |
| Status | Closed |
| Package | Net_Server |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2004-07-04 21:49 UTC] Progman2002 at gmx dot de
Description:
------------
I wish there is a handler onIdle() or sth. which is called on every loop or only then if nothing happends. Now a Server can only react on incoming messages, but it cannot act do to sth.
For example, if I have connections to several clients and need a "OK"-Messages. All Clients except one send the "OK"-Message. So my server is hanging because I programmed to wait for all OK-Messages, but the last one isn't coming. And I have no chance to do sth cos the mentioned onIdle() handler is missing, where it could be possible to resend a message for giving the OK-Message or just close the connection.
Or are there other ways to act and not only react on messages? (background: its a little gameserver with a lot of messages between server and client)
[2005-11-28 20:18 UTC] erudd at netfor dot com
Possible solution in pear bug #6098
setting a timeout on socket_select to *create* an idle loop in the code.