Preventing connections

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

Moderators: Lapo, Bax

User avatar
LordDawn
Posts: 42
Joined: 15 Apr 2019, 08:36

Preventing connections

Postby LordDawn » 10 May 2019, 07:30

Is there a method to disallow connections after SERVER_READY and before my rooms have finished loading objects and initializing? Similarly, to disallow connections when the shutdown hook runs and tells each room to save all it's objects before closing?

If there is no server wide allowConnections = false or similar what would be the best method to catch new connections and disconnect them? The first event I see for new connections is USER_LOGIN.

Many thanks.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Preventing connections

Postby Lapo » 10 May 2019, 07:38

Hi,
no there is no such tool in SFS2X.

Similarly, to disallow connections when the shutdown hook runs and tells each room to save all it's objects before closing?

Since the server is going down even if a client manages to connect a split second before the server halts, it will get closed a few milliseconds later.

If there is no server wide allowConnections = false or similar what would be the best method to catch new connections and disconnect them? The first event I see for new connections is USER_LOGIN.

There are no such mechanism.
I am not sure why you would need that when the server is already shutting down.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

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