How to creeate and delete room dynamicaly

2,041 views
Skip to first unread message

Daniel

unread,
Apr 23, 2012, 4:00:59 PM4/23/12
to sock...@googlegroups.com
Hi,
I am starting with Socket IO. So I need create and delete rooms in my chat server.
Is it possible to do it ?
I understand about join,leave and others related commands .

The problem to solve is the requirement that rooms list changes dinamicaly along time execution controled by code. So Is necesary create and delete rooms..
for example I need first
rooms =['room1','room2','room3']
but in other time
rooms =['room1','room4','room5']
So only the clients can access to existing room not others.
 
Any help?
 

ec.developer

unread,
Apr 25, 2012, 8:54:28 AM4/25/12
to Socket.IO
The rooms are created and destroyed automatically. When you start your
server and somebody connects to it, there should be a single room
("/"). If you make socket.join("room1") - the "room1" room will be
created. If you make socket.leave("room1") and no other users are
connected to this room - it will be destroyed.

Daniel Rubio

unread,
Apr 25, 2012, 1:36:23 PM4/25/12
to sock...@googlegroups.com
 Thank you for help. 
I am a little ashamed for the basic kind of my question.
your help is very valuable.
Reply all
Reply to author
Forward
0 new messages