Answer the question
In order to leave comments, you need to log in
How to make private messages on Yii2 & Socket.io?
Hello!
1. There is a modular Yii2-basic application with cookie-based authorization borrowed from the advanced template. It has a message module.
2. Added another Node(express, socket.io, redis) server.
3. When a user sends a message, information about it is also sent to the Redis channel.
4. Socket.io is subscribed to this channel, but does not know to whom to send, to which room (for example, user_id).
How to implement message delivery to a specific user via socket.io? How to identify a user in Node?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question