In version 0.6 I used this method to send a message to specific group of clients. It will exclude the clients with the session IDs in the ‘excludedClients’ array and send to all clients who are not excluded.
var excludedClients = [sessionID1, sessionID2, sessionID3];
io.broadcast(msg, excludedClients);
- Is this method still applicable in V0.7?
- Is this the best way of doing this?
Hope someone can give me a hand with this, there doesn’t seem to be any solid documentation for Socket IO anywhere, only briefly explained examples on the github page.
I believe so; check out the wiki page on 0.6 to 0.7 migration.
If your clients can be grouped logically, you can use rooms.