How to attach a Symfony Session with the connection object from Ratchet?

冷暖自知 提交于 2019-12-05 05:02:00

问题


Hi I am working in a symfony real time app using Ratchet Library, In my app I need to send some data to a specific user.And the only way to do this is to attach a symfony session object to each incoming Connection object. I have read the doc here but I can't understand it and how to make it work in symfony?


回答1:


As the documentation states need to setup a non-native session handler to store your sessions i.e. in a database via PDO.

Then you need to configure Ratchet to use your session handler. If you're using ClankBundle you can read this documentation chapter.



来源:https://stackoverflow.com/questions/17558657/how-to-attach-a-symfony-session-with-the-connection-object-from-ratchet

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!