Merging the chat server example and the event loop with tick() ?
Hello,
being new to the concepts of PHP's asynchronous programming, I read with very interest the https://amphp.org/getting-started/tcp-chat/ example, thank you very much for providing it.
Having done, unhappily, an app using JS socket.io for the html client and Node socket.io for the server, since I like PHP more, I decided to take the challenge to port the server to PHP with these concepts.
I wonder how and if would be possibile to merge a tick into the tcp chat server-like. For example where to put an "echo 'o'" in order to see the o's printed continuosly in the prompt window and at the same time listening for client's connections and managing their messages broadcast.
Should I use another [https://amphp.org/amp/event-loop/(amp/loop) somewhere? I Wouldn't know where to start to implement such a thing :(