Well You can always send custom events for some specific channel. Example:
socket.on("global_event", function(channel, data) {});
socket.on("user_XYZ", function(channel, data) {});
emit_to_channel('some_room', 'gobal_event', 'hello')
emit_to_channel('some_room', 'user_XYZ', 'hello XYZ')
I understand this is not the most secure way but you can ensure additional encryption like hashing on every request or shit like that or even have every user connects to its own "secured" channel.
Hope this helps.
--Hi,I am working on a message sending/reading app atm. Is there any way to push a message to a particular user session by using Redis and SSE ? I am using the tutorial at https://github.com/fcurella/django-push-demo and it works great with the current setup (which means I can send the whole bunks of new messages to all users but this is not what I wish for, obviously). When a user A composes a message and send to user B, how can I just "push" that new message to that particular user B ?
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAM3VocpM%2Bn1Xw0mhMf3iWbQD%2BjZ%2BGini5v5XjPXYipXjnLTJzg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAD1DFf1T0nTLPV2fO5Y4RDgmZ%3DWQziFCeORearNi1ioX43Zg5w%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment