I have downloaded chat-example from socketo.me and it started fine on localhost. But I want to create a private (one-to-one) chat when logged in user A writes a private message to the user B. Also at Ratchet site I saw tutorial how to save blog post to the mysql - that snippet of code will help me to understand how to save chat message from user A (create chat history) and talk about new message to the user B.
1) But I don't understand how to identify that user A is really user A and how to deliver message exactly to the user B and only for him.
My site is based on Zend Framework. So I can get session and see who is current user and he is logged in or not.
2) When user A open a chat window the router will be "chat/userB" and if user B open chat - router for him will be "chat/UserB". I can do that with Zend Framework (I mean for simple pages nonrealtime stuff), but Ratchet use Symfony2 routings. Can I handled this somehow to use Zend Framework routings?