I have noticed it couple of times before as well. But it is bothering me more now.
In couple of scenarios, ( e.g when i pull my lan cable ) , userLost is not received in server extension.
Is it known ? Are there any typical cases where it happens ? Any work around for it?
userLost event
Re: userLost event
(use the forum search function!)
Lapo wrote:If you turn off your network abruptly (i.e. pull the plug) all your socket connections will remain open. No application (SFS included) will have a clue that the network is down. The reason is that TCP connections require a 4 way message transaction to disconnect, but if no network is available a proper disconnection will not occur. Hence no events.
The good news, however, is that when you plug the network again everything will keep working as if nothing has happened.
If you let too much time pass the OS might actually force all the connections to close if there's a timeout in the system (most OSes have one)
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
userLost event
But the TCP will timeout eventually, right ? So when TCP times out, it should fire userLost . Please let me know if i am wrong.
Yes that's correct. You can also set the <DeadChannelsPolicy> setting in the config.xml file to 'strict', so it will remove most of these ghost connections quicker and throw the userLost event.
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.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Return to “Server Side Extension Development”
Who is online
Users browsing this forum: No registered users and 22 guests