Page 1 of 1

Connection Lost

Posted: 07 Jun 2011, 12:29
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?

Posted: 07 Jun 2011, 13:46
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)

Posted: 08 Jun 2011, 06:18
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?

Posted: 08 Jun 2011, 07:08
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

Posted: 08 Jun 2011, 09:23
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 ! ! !.

Posted: 08 Jun 2011, 12:19
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

Posted: 08 Jun 2011, 17:31
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 :-)

Posted: 09 Jun 2011, 09:34
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...