title: socket.io with socket.io-redis: get all socket object in a room
body: <p>I want to retrieve server side all socket connected in a room. </p>
  
  <p>I have found the method <code>clients</code> that if chained after the method <code>in</code> return all the sockets connected in a room:</p>
  
  <pre><code>import * as express from 'express';
  import * as SocketIO from 'socket.io';
  import * as redisSocket from 'socket.io-redis';
  import * as sharedsession from 'express-socket.io-session';
  
  const app = express();
  
  const redisOption = {port: 6379, host: 'XXX'};
  
  // use the RedisStore as express session
  const session = session({
    name: 'SESSIONID',
    store: new RedisStore(redisOption),
    secret: 'Ashg8hV77bxFeyLVec',
    resave: false,
    saveUninitialized: false
  });
  app.use(session);
  
  // start express server
  const httpServer = app.listen(80);
  
  // attach the express app to socket.io server
  const socketServer = SocketIO(httpServer, { path: '/api/socket.io', origins: '*:*' });
  
  // set redis as socket adpter for multi instance/nodes
  socketServer.adapter(redisSocket(redisOption));
  
  // share the express session with socket.io
  socketServer.use(sharedsession(session, {autoSave: true}));
  
  // get all client in a room
  socketServer.in(room_id).clients((err, clients) =&gt; {
      for (let i = 0, e = clients.length; i &lt; e; i++) {
          const client = clients[i];
          console.log(client); // print the socket id
  
          // HOW RETRIVE THE SOCKET OBJECT???
      }
  });
  </code></pre>
  
  <p>But i need to retrive all sockets session/handshake.</p>
  
  <p>There is a way for retrive all sockets session/handshake?</p>
  
  <p><strong>SIDE NOTE: the socket server is multi instance/nodes with socket.io-redis</strong></p>
  
  <ul>
  <li>socket.io: 2.3.0 </li>
  <li>socket.io-redis: 5.2.0</li>
  </ul>