Pusher send presence event to specific member

爷,独闯天下 提交于 2019-12-04 12:33:45

You can't send events to specific users/clients on a channel.

The best way to do this would be to have a private- channel per user so that you can send information only to them. The fact they're private also means that you can ensure only the expected user subscribes (see authenticating users).

In your case the channel name can be 'private-' + user_id.

You can then get the user to subscribe to that channel and publish to that channel from the server.

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