Gausie
Gausie

Reputation: 4359

Can I get a list of the rooms a client is connected to in socket.io?

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

Thanks

Upvotes: 1

Views: 344

Answers (1)

user568109
user568109

Reputation: 47993

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

See here.

Upvotes: 2

Related Questions