Whitelist for ghost users?

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

Moderators: Lapo, Bax

kevinfoley
Posts: 10
Joined: 07 Sep 2018, 21:10

Whitelist for ghost users?

Postby kevinfoley » 10 Sep 2018, 18:13

We are starting work on an authoritative setup for a Unity MMO game, which combines SmartFox with a dedicated master Unity client running in headless mode. Right now the master client gets disconnected after a minute or two. I'm not seeing any error messages on the server or in Unity, so my best guess is that SmartFox is deciding that the master client is an idle ghost (since it doesn't spawn its own player), and kicking it.

Is there a way to add our master client to a whitelist so that it can't get kicked for ghosting, while still allowing ghost-kick for all other clients?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Whitelist for ghost users?

Postby Lapo » 10 Sep 2018, 21:45

Hi,
we usually call a "ghost" a client whose disconnection was incomplete (e.g. closed from one side only) that lingers in the system.

Is this what you're referring to?

Otherwise SFS2X kicks regularly connected clients that are idle for too long, but you can avoid that by sending an empty request every few seconds (e.g. 30-40s) to keep the connection alive.
For instance you can send an Extension Request with no parameters, or something similar.

Does this help?
Lapo
--
gotoAndPlay()
...addicted to flash games
kevinfoley
Posts: 10
Joined: 07 Sep 2018, 21:10

Re: Whitelist for ghost users?

Postby kevinfoley » 10 Sep 2018, 21:54

Thanks. The master client seems to get disconnected even when it is sending periodic extension requests, so maybe it's some other issue. I'll keep troubleshooting.
kevinfoley
Posts: 10
Joined: 07 Sep 2018, 21:10

Re: Whitelist for ghost users?

Postby kevinfoley » 11 Sep 2018, 01:22

It turns out the master client was getting kicked from the room because we never set a position for the master client, and players who are never given a position are automatically kicked after about a minute.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Whitelist for ghost users?

Postby Lapo » 11 Sep 2018, 07:28

That's correct, for MMORooms.
Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 50 guests