Dynamic rooms auto-destroy?

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

User avatar
thomers1
Posts: 125
Joined: 13 Aug 2008, 07:36
Contact:

Dynamic rooms auto-destroy?

Postby thomers1 » 30 Jun 2009, 08:32

hello lapo,

if i create a room with ExtensionHelper.createRoom, how exactly is the "owner" user of the room treated?

e.g., if the "owner" user is set (not "null") and he leaves the room, what happens?

what if he logs out?

what can an owner of a room do?

also, what is a temporary room, and when do i need Room.setTemp?

thx,
thomers
User avatar
Lapo
Site Admin
Posts: 21922
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 30 Jun 2009, 12:40

Hello,
e.g., if the "owner" user is set (not "null") and he leaves the room, what happens?

When you pass null the owner is the Server itself, so the room is never removed, unless you force it via code.

what can an owner of a room do?

Change it's furniture, hang a few pictures... :D
Nah... seriously. The owner simply determines when the room should be removed.
You can learn more about these details in this article:
http://www.smartfoxserver.com/docs/docP ... ecture.htm
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
thomers1
Posts: 125
Joined: 13 Aug 2008, 07:36
Contact:

Postby thomers1 » 30 Jun 2009, 13:58

Lapo wrote:
e.g., if the "owner" user is set (not "null") and he leaves the room, what happens?

When you pass null the owner is the Server itself, so the room is never removed, unless you force it via code.


yes, but what if the owner is set to a valid user, and this user leaves the room?

according to the "room architecture" doc, the room is destroyed after the last user leaves.

if thats the case, what is the difference between the owner user and any other user in the room?

thanks
t
User avatar
Lapo
Site Admin
Posts: 21922
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 30 Jun 2009, 14:13

yes, but what if the owner is set to a valid user, and this user leaves the room? According to the "room architecture" doc, the room is destroyed after the last user leaves.


It is destroyed when the last user leaves for game rooms.
It is destroyed when empty and the owner disconnects for regular rooms

if thats the case, what is the difference between the owner user and any other user in the room?

Actually none
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
thomers1
Posts: 125
Joined: 13 Aug 2008, 07:36
Contact:

Postby thomers1 » 30 Jun 2009, 16:21

lol ok.

thanks!
khambadkone
Posts: 7
Joined: 28 Feb 2008, 10:55
Location: India
Contact:

"game room created dynamically" does not destroy a

Postby khambadkone » 17 Nov 2009, 18:29

The room architecture document states "A game room created dynamically is destroyed when the last user goes away."

However, this would only apply to rooms that are setOwner to the user. i.e. if the owner is set to the server, the Room is not auto-deleted.
User avatar
Lapo
Site Admin
Posts: 21922
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 18 Nov 2009, 20:22

Yes, that's correct.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “Server Side Extension Development”

Who is online

Users browsing this forum: Google [Bot] and 13 guests