I posted this question on PerlMonks (http://www.perlmonks.org/?node_id=1070002) but I suppose I should have asked here instead.
I am creating a Mojolicious based webapp which uses a websocket connection to periodically serve up JSON data to the client browser, which in turn uses JavaScript to render that JSON data on the webpage. My implementation assumes the following sequence of operation: 1. User points their web browser to a static page served up by Mojolicious 2. This static page uses JavaScript to open a websocket connection and send a single JSON packet to Mojolicious to kickstart the next step 3. Mojolicious should periodically send JSON data back to the browser with new data I am having problems with the last step. I think I am not understanding how Mojo::IOLoop is supposed to work. When I run my current implementation, I get one *Event "read" failed: Mojo::IOLoop already running* error which closes the websocket, then I get a single iteration of a delay, and then Mojolicious crashes. The documentation for Mojo is not the best, or I am missing something. Any ideas? Unfortunately, because of my work firewall, I cannot upload the source files to google docs. For the time being, please see my code in the PerlMonks post. Thank you in advance! -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/groups/opt_out.
