Send shaft does not work with the Here's my code: I am not sure what you are trying to accomplish, but this is a basic example. I am ready to bet that you will need to work your code again to adjust this technique. Source: sleep function, how can I fix it?
$ i = 0; While ($ i & lt; 180) {foreach ($ this-> clients as $ client) {$ client- & gt; Send ($ res-> asXML (). "\ 0"); } Sleep (2); $ I ++; } Sleeping with shaft is not a good idea.
// server $ server = IoServer :: factory (new WsServer ($ session), $ port, $ ADR); // loop $ server-> Loop-> Adapter timer (2, function) ($ client- & gt; send ($ res-> asXML). "\ 0");});
No comments:
Post a Comment