Closed gbrault closed 1 year ago
Thanks. Unfortunately I cannot accept this change due to a few problems:
echo.py
is supposed to be a simple example that allows a client and a server to communicate. It does not make sense to add a clock to an "echo" example.No issue @miguelgrinberg I understand the points. My purpose was to provide an example of ws communication which was unattended from the client perspective.
@gbrault Yes, and I am okay with the idea of adding a separate example that shows how to send from server to client. Mixing this with the echo example makes the code more difficult to understand.
Totally agree! Do you want me to make a proposal? (and an according modified pull-request)?
Yes, feel free to submit a new PR with a separate example. Thank you!
I just added few lines of codes in the server.py and add a span in the index.html.
Of course it's a bit bigger than the original, but still simple enough to grasp the concept.
It shows the ws can really be a two way channel