I have socket.io running on multiple servers and uses redis as the adapter. I am trying to access all the sockets in one room and see if the room is empty, but I couldn't find all the sockets connected to different servers, though they are in the same room.
var io
io = socket_io(server);
io.adapter(redis({ host: 'localhost', port: 6379 }));
io.nsps['/'].adapter.rooms[roomName] #returns undefined
# this doesn't work either, always complain 'clients' is undefined, thus can't be used as a function
io.of('/').in(roomName).clients(function(error, clients){
if (error) throw error;
console.log(clients);
});