Pubnub with more than 2 users

In one of my apps I was thinking that I should use pubnub for different things. I know how I can easily send a message between two devices by just having them in the same channel. But what if I have 3 users? Or maybe 10? Or even 1000? Well then I just put all on the same channel. Here is the problem:

Let’s say I have 3 users: A, B and C
What do I do if I want them to be in the same channel but A wants to send a message to B that C can’t see?

I thought I could just add a receiver variable to the message but how do I know the id of the other user? I mean if I would have something like a contact list, how do I identify each user with pubnub? [import]uid: 24111 topic_id: 20066 reply_id: 320066[/import]

Well with a single channel on pubnub you probably won’t be able to filter who gets the messages, but you can certainly program your app to ignore messages that are not for it.

This isn’t the most secure or efficient way, but given your rules, it may be your only choice.

[import]uid: 19626 topic_id: 20066 reply_id: 78352[/import]

I agree with robmiracle’s comments! You may filter who gets data by ignoring incoming data that is irrelevant to that player. Or you may create separate channels to flow data to players by topic or segment (like a game world or game region). Neat patterns emerge like GeoFencing, Game World Grids and more! [import]uid: 27840 topic_id: 20066 reply_id: 79265[/import]