0

How do you count the number of sockets in a room in Golang. With socketio in nodejs it appears you can do this:

io.of('/chat').sockets.length

How do you do the same with the socketio library for Golang?

Community
  • 1
  • 1
Neil
  • 8,367
  • 8
  • 40
  • 48

1 Answers1

0

You basically can't. There is no method in the API that accepts a room and returns the number of sockets.

Post a feature request on the project github page.

amahfouz
  • 2,050
  • 1
  • 14
  • 20