Categories
JavaScript Answers

How to get Node Socket.IO connected user count?

Spread the love

To get Node Socket.IO connected user count, we use the socketIO.engine.clientsCount property.

For instance, we write

const numClients = socketIO.engine.clientsCount;

to get the number of clients connected with socketIO.engine.clientsCount.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *