I'm trying to make a site where all clients will be connected with the server and communicate with each other. What I need to do is to create sockets.
I know that through this technique, whenever a client does some action, then the other clients can immediately see it because the server will "push" the data to them (something like that. I am new to sockets anyway).
However, I don't want EVERY client to be able to see ANY data about what the other clients do, but ONLY what they have the privilege to see. (privileges are calculated through some values in a database).
Is socket programming able to do that? If not, then I will figure out another way to make my site, maybe long-polling. (If yes, an example would be appreciated a lot)