Block all requests for a period of time from the client

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

Moderators: Lapo, Bax

votagusvotag
Posts: 38
Joined: 07 Nov 2016, 12:26

Block all requests for a period of time from the client

Postby votagusvotag » 24 Jan 2018, 18:43

Hi, is there a way to do this? I need it because currently if I want to update the principal room, lets call it Menu, I have to restart the server. What I want to do is to block all the requests for like 2 seconds, create a new Menu room with the updated .jar, pass all the users from the old Menu to the new Menu and then remove the old Menu.
This way no restart is needed.
I need to block all the requests to avoid certain situations that may occur if a user is moved from one room to the other whilst a request was being processed.

Or... if there is a better way...
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Block all requests for a period of time from the client

Postby Lapo » 25 Jan 2018, 14:48

If by "requests" you mean your custom Extension calls, the answer is yes as you have full control in your Extensions.
Normal SFS2X calls such as LeaveRoom or SetRoomVariable can't be stopped.

You could still avoid sending those from the client side and instead create your custom "leaveRoom" or "setVariable" which invoke your Extension and then get executed. This way you can validate the calls before they get executed.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 49 guests