Published
- 1 min read
socket.io how do i get a list of connected sockets clients
The solution for this is noted below
socket.io how do i get a list of connected sockets clients
Solution
const sockets = Array.from(io.sockets.sockets).map((socket) => socket[0])
console.log(sockets)
Try other methods by searching on the site. That is if this doesn’t work