User automatically removed from the room as soon as he is disconnected from the server

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Lal Chand Sharma
Posts: 1
Joined: 18 Aug 2017, 04:31

User automatically removed from the room as soon as he is disconnected from the server

Postby Lal Chand Sharma » 18 Aug 2017, 11:03

Whenever a user is disconnected from the server, the server automatically throws the user out of the room that he has joined. I am not able to understand what's the issue. Please find the code below and suggest proper solution.


Sample code for room create :-

CreateRoomSettings crs = new CreateRoomSettings();
crs.setName(roomName);
crs.setMaxUsers(cgpm.getMaxPlayer());
crs.setGame(true);
crs.setAutoRemoveMode(SFSRoomRemoveMode.NEVER_REMOVE);

Room room = getApi().createRoom(getParentExtension().getParentZone(), crs, null);
getApi().getResponseAPI().notifyRoomAdded(room);

Sample code for join room :-

getApi().joinRoom(user, room);
getApi().getResponseAPI().notifyJoinRoomSuccess(user, room);
getApi().getResponseAPI().notifyUserEnterRoom(user, room);
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: User automatically removed from the room as soon as he is disconnected from the server

Postby Lapo » 18 Aug 2017, 14:21

Hi,
you already sent us an email with the same request.
There is no need to double post
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 59 guests