//get member list
var clients = io.sockets.clients(<Room name>)
//send messege to each members
for(var i=0;i<clients.length;i++){
var clientSocket = clients[i];
clientSocket.emit('indivisual message',{memberID: i});
}
The type of return's value is Array.
No comments:
Post a Comment