I\'ve made a chat client with different chat rooms in NodeJS, socketIO and Express. I am trying to display an updated list over connected users for each room.
Is ther
In socket.io@2.3.0 you can use:
Object.keys(io.sockets).forEach((socketId) => { const socket = io.sockets[socketId]; })