Closed pauleveritt closed 8 years ago
See my other comment on issue #4, I think this can be solved elegantly using a push + request-reply API mechanism.
On Aug 14, 2015, at 7:18 AM, Seppe vanden Broucke notifications@github.com wrote:
See my other comment on issue #4 https://github.com/Jycraft/jycraft-server-plugin/issues/4, I think this can be solved elegantly using a push + request-reply API mechanism.
Just to be clear, I would be able to write a module in ./plugins which had an object I could call a method on, resulting in broadcast of a message on a “channel”?
Then, browser clients could open a websocket connection, either for that specific channel or in general but having channel as an attribute on the message?
If so, then great. :) Really, either is a massive step forward for what I can implement in Angular.
—Paul
Here's the use case...I'd like to write some Python which attaches an event handler (for example, a user moves in the world) and have some code run which sends a web socket message to my Angular app. For example, it moves an icon on the screen.
I currently have a Python module in ./plugins which my Angular app contacts by polling every 0.5 seconds. Certainly not the most efficient.