jeudi 2 avril 2015

how to omit in sails.js two or more sockets in sails.sockets.broadcast?

I need to know how to omit in sails.js two or more sockets in sails.sockets.broadcast? I tried this:



function sendMessage(data){
var socketIds = ['socketId1','socketId2'];
sails.sockets.broadcast("room","event",data,socketIds);
//sending data to ALL sockets in the room :/
}


but it doesn't work.


I need know this because I need omit the sockets which belong to the same session. (example: session of user in computer browser and android browser)


somebody help?


Aucun commentaire:

Enregistrer un commentaire