Can I get a list of the rooms a client is connecte

2019-07-29 23:11发布

问题:

What it says at the top - for a given client, can I see what rooms they have joined?

Thanks

回答1:

Given a socket you can get all the rooms it has joined via io.sockets.manager.roomClients[socket.id].

See here.