Hi,
I am facing a strange issue with SFSEventType.USER_DISCONNECT, it gets fired when I close my browser but it doesn't get into the handler when LAN cable is unplugged or network connection is disabled.
Please Help!
Regards,
Anupam
SFSEventType.USER_DISCONNECT not being fired
-
pankaj454k
- Posts: 9
- Joined: 25 Aug 2011, 08:25
Re: SFSEventType.USER_DISCONNECT not being fired
When you close the browser, all the connections are correctly ended.
Instead when you abruptly unplug the cable or disable the network connection, the socket connection can't be terminated properly and SFS is not immediately aware that the client isn't there anymore.
The event will be fired later, when a timeout occurs at operating system level.
Instead when you abruptly unplug the cable or disable the network connection, the socket connection can't be terminated properly and SFS is not immediately aware that the client isn't there anymore.
The event will be fired later, when a timeout occurs at operating system level.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: SFSEventType.USER_DISCONNECT not being fired
Hi
Could you explain me
What kind of events order will be on the server and flash if there's set setting "User reconnection timeframe" = 3
USER_DISCONNECT
USER_RECONNECTION_TRY
USER_RECONNECTION_SUCCESS
user in room in time disconnect
USER_DISCONNECT and USER_LEAVE_ROOM or only USER_DISCONNECT
The event USER_LEAVE_ROOM is running only if user didn't join the room in the proper time?
if the user was the last in the room (the room should be removed if it is empty) and there was a remote Internet connection or the browser was crashed. The room will be deleted immediately or it wait of time set in setting "User reconnection timeframe"
Thanks
Could you explain me
What kind of events order will be on the server and flash if there's set setting "User reconnection timeframe" = 3
USER_DISCONNECT
USER_RECONNECTION_TRY
USER_RECONNECTION_SUCCESS
user in room in time disconnect
USER_DISCONNECT and USER_LEAVE_ROOM or only USER_DISCONNECT
The event USER_LEAVE_ROOM is running only if user didn't join the room in the proper time?
if the user was the last in the room (the room should be removed if it is empty) and there was a remote Internet connection or the browser was crashed. The room will be deleted immediately or it wait of time set in setting "User reconnection timeframe"
Thanks
Re: SFSEventType.USER_DISCONNECT not being fired
When HRC is active and a user is disconnected you get the USER_RECONNECTION_TRY event (client and server)
If the client reconnects successfully you will get USER_RECONNECTION_SUCCESS otherwise a regular USER_DISCONNECT will be fired.
If the client reconnects successfully you will get USER_RECONNECTION_SUCCESS otherwise a regular USER_DISCONNECT will be fired.