JDare/ClankBundle — pull request #4 by jbbrunsveld (2013-07-12 09:41:09+00:00)
Title: ServerEvent added to provide internal Event Loop

Hi JDare ;)

Thanks for your great effort to publish this bundle. It's save me a lot of time and it has a nice Symfony2 implementation. I tried to make a push integration from the server using a MessageQueuer like Redis. (As Ratchet did in their examples) but I prefere to use the ClankBundle.

In order to run a service in the same eventloop, I think we need a way to expose the eventloop object. I made a ServerEvent triggered by the server launch method. It only contains the loop (but thats enough) so I can add extra services in a separated listener in my own bundles. I made a test with a Redis Pub/Sub client in the listener and it works like a charm.

When you agree with this pull request I'll also make an example in the manual for a push service with a MQer or something similar.