title: socket.io, how to attach state to a socket room
body: <p>I was wondering if there was any way of attaching state to individual rooms, can that be done?</p>
  
  <p>Say I create a room <code>room_name</code>:</p>
  
  <p><code>socket.join("room_name")</code></p>
  
  <p>How can I assign an object, array, variable(s) to that specific room? I want to do something like:</p>
  
  <p><code>io.adapter.rooms["room_name"].max = maxPeople</code></p>
  
  <p>Where I give the room <code>room_name</code> a state variable <code>max</code>, and <code>max</code> is assigned the value of the variable <code>maxPeople</code> that is say type int. Max stores a variable for the maximum amount of people allowed to join that specific room. Other rooms can/could be assigned different max values.</p>