Hey, I am trying to add multiple users to each room. This is what I did server-side...
socket.on('find', () => {
const url = socket.request.headers.referer.split('/');
room = url[url.length - 1];
const sr = io.sockets.adapter.rooms[room];
console.log("sr", sr)
if (sr === undefined) {
// no room with such name is found so create it
socket.join(room);
socket.emit('create');
} else {
socket.emit('join');
} //else { // max two clients
//socket.emit('full', room);
//}
console.log(room);
});```
It seems to add multiple sockets to each room, then the client-side breaks down.