How to dynamic set room Visible/Invisible ? need Help!!!

I want make if my session have arrived Max connections,
At the lobby can't my session,
I looked at the API,
still unknown how to do :s

how to set room connections and dynamic set room Visible/Invisible?

need help Thanks!

(Sorry my English bad.)