0

I am just trying to get connected sockets for a user list without other rooms, because i only have one room, which i want to get all connected users in the list. I am using NodeJS and socket.io.

This is not working:

var clients = io.sockets.connect();

1 Answers1

0

var clients = io.sockets.clients(); gives all the connected sockets. For socket.io 1.0+ see this answer.

Community
  • 1
  • 1
Barış Uşaklı
  • 13,440
  • 7
  • 40
  • 66