Send message to a particular client only

84 views
Skip to first unread message

Anilkumar Bind

unread,
Nov 2, 2015, 6:08:04 AM11/2/15
to Ratchet
I want to send message to particular client only.
Lets say there are two chat rooms say A and B and user A1 and A2 are chatting in room A and user B1 and B2 are chatting on room B, but when i connect these two room on websocket and when user A1 send chat to A2 it also goes to B1 and B2 also. i am not getting where the problem is and i have done setting of memcahce as per ratchet session provider but still don't work.

Andrzej Sternal

unread,
Nov 2, 2015, 5:58:09 PM11/2/15
to Ratchet
Do you use a Wamp subscriber/publisher concept? I think it suits very well here, where you can have a separete topics for room A and room B. Then users A1 and A2 listen and publish just on topic "room A". Ratchet have a Wamp serwer component ready, and you can use JS library like autobahn to have Wamp protocol client in your browser. I think it is described in ratchet docs how to start with WAMP.
Reply all
Reply to author
Forward
0 new messages