Private (one-to-one) chat on Ratchet

693 views
Skip to first unread message

webprogr...@gmail.com

unread,
Nov 17, 2014, 5:30:03 PM11/17/14
to ratch...@googlegroups.com

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?

arifhus...@gmail.com

unread,
Apr 15, 2015, 3:32:04 PM4/15/15
to ratch...@googlegroups.com, webprogr...@gmail.com
Reply all
Reply to author
Forward
0 new messages