sails.sockets.subscribers()

Get the IDs of all sockets subscribed to a room.

  1. sails.sockets.subscribers(roomName);

Usage

Argument Type Details
1 roomName ((string)) The name of the room whose socket ids should be retrieved.
e.g. 'supportchat'

Example

  1. sails.sockets.subscribers('supportchat');
  2. // => ['BetX2G-2889Bg22xi-jy', 'BTA4G-8126Kr32bi-za']