Question about user disconnect

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

Moderators: Lapo, Bax

Alex
Posts: 131
Joined: 03 Sep 2006, 09:15

Question about user disconnect

Postby Alex » 24 Aug 2010, 06:59

Hi
I have the following problem - when a user is dropped( for example the user unplug his network cable ) - the connection stays active for around 30 second( I guess this is a setting in the config file ) before the user is disconnected.
I'm not very familiar with socket programming - but is there a way to detect that socket connection is in such state( that the user is disconnected ) before the timeout is finished.
Here is example - lets say I have a turn based game and each turn duration is 30 sec. User_A should make a move, but he waits until the timer reaches 2 sec and unplug his network cable this will delay the userDisconnected event with another 30 sec.
What I want is - when the game timer reaches 0 - the other players will send message to the server that User_A has not made his move - check his socket connection.
Is this possible - can I detect the socket status?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Postby Lapo » 24 Aug 2010, 09:09

You already asked the same questions in another topic. Please no double posts. Thanks

This is a very asked question, and with a little search you should have already found several topics all pointing here:
viewtopic.php?p=17716#17716
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

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