Connection Lost

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

Moderators: Lapo, Bax

Post Reply
Oleg_79
Posts: 161
Joined: 25 Feb 2011, 10:31
Location: Ukraine, Donetsk

Connection Lost

Post by Oleg_79 »

disappears when the connection to the Internet - neither the client nor the server is not coming event USER_DISCONNECT. What is wrong?
Sigtran
Posts: 56
Joined: 10 Mar 2011, 15:54
Location: Ireland

Post by Sigtran »

Your "User Reconnection Timeframe" is set to none 0 value (set in the sfs2x admin tool).
I'd say check out SFSEventType API... (e.g. USER_RECONNECTION_TRY && USER_RECONNECTION_SUCCESS events)
Oleg_79
Posts: 161
Joined: 25 Feb 2011, 10:31
Location: Ukraine, Donetsk

Post by Oleg_79 »

Sigtran wrote:Your "User Reconnection Timeframe" is set to none 0 value (set in the sfs2x admin tool).
I'd say check out SFSEventType API... (e.g. USER_RECONNECTION_TRY && USER_RECONNECTION_SUCCESS events)
how do I catch an event when the user is off the internet? SmartFoxServer 2X sees it as being connected to and off of Idle timeout.
how to catch the event off the Internet user? User Disconnect not working
what is wrong?
Sigtran
Posts: 56
Joined: 10 Mar 2011, 15:54
Location: Ireland

Post by Sigtran »

Oleg_79 wrote: how do I catch an event when the user is off the internet?
Catch USER_RECONNECTION_TRY event (just check and see if I was right & your "User Reconnection Timeframe" is above "0" value)
Oleg_79 wrote: SmartFoxServer 2X sees it as being connected to and off of Idle timeout.
how to catch the event off the Internet user?
From API:
When a User looses connection for an unknown reason the client will attempt to re-connect immediately. If the operation is done within the expected time the User connection will be resumed transparently.
Oleg_79 wrote: User Disconnect not working what is wrong?
If my first post iss correct, then you are just not catching the right event. thats it. read: http://docs2x.smartfoxserver.com/api-do ... ECTION_TRY
Oleg_79
Posts: 161
Joined: 25 Feb 2011, 10:31
Location: Ukraine, Donetsk

Post by Oleg_79 »

Sigtran wrote:
Oleg_79 wrote: how do I catch an event when the user is off the internet?
Catch USER_RECONNECTION_TRY event (just check and see if I was right & your "User Reconnection Timeframe" is above "0" value)
Oleg_79 wrote: SmartFoxServer 2X sees it as being connected to and off of Idle timeout.
how to catch the event off the Internet user?
From API:
When a User looses connection for an unknown reason the client will attempt to re-connect immediately. If the operation is done within the expected time the User connection will be resumed transparently.
Oleg_79 wrote: User Disconnect not working what is wrong?
If my first post iss correct, then you are just not catching the right event. thats it. read: http://docs2x.smartfoxserver.com/api-do ... ECTION_TRY

USER_RECONNECTION_TRY event DO NOT WORK ! ! !.
Sigtran
Posts: 56
Joined: 10 Mar 2011, 15:54
Location: Ireland

Post by Sigtran »

Oleg_79 wrote: USER_RECONNECTION_TRY event DO NOT WORK ! ! !.
meh, I just checked and I too dont get any event fired up neither on the server side or the client side (if the user unplugs his internet connection). Report as a bug? Using version 2.0.0-RC2a
User avatar
rjgtav
Posts: 2813
Joined: 19 Apr 2009, 11:31
Location: Lisbon, Portugal

Post by rjgtav »

hi. Thats is not a bug. Lapo explained this some time ago, but now im on mobile and cant provide the link. What happens is that when you plug out the internet cable, you suddenly close the connection and it is not possible to restore. The connection retry is for the cases when for some reason you lose you internet connection but it then restores again. Hope i explained it correctly :-)
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Sigtran
Posts: 56
Joined: 10 Mar 2011, 15:54
Location: Ireland

Post by Sigtran »

ah, got the topic now:
http://forums.smartfoxserver.com/viewtopic.php?p=1841
apparently its to do with how the OS is handling the sockets...
Post Reply