are the 2 parallel servers physically on the same machine?
are they the same version?
do they use the same zone configuration?
when users pull the plug
Re:
Lapo wrote:That's what we call "sloppy disconnections" And they can happen more often than you can imagine.
The example you provided is just one of those cases. If you want to do a better experiment try this:
- start the server on one machine
- launch a client on another machine and establish a connection
- now check the connections on the server using netstat (under Windows open a console window and type "netstat"). You will notice the client-server connection in ESTABLISHED status
- now pull the ethernet cable off the client machine
- go back to the server and keep checking the netstat... you'll be amazed in seeing that the connection is still there!!
That's why SmartFoxServer doesn't handle the disconnection, because the lower level TCP layer didn't catch it too
Anyways SFS deals with the problem efficiently by automatically closing all idle connections as specified in the <MaxUserIdleTime> parameter in the config.xml
So, even if you have thousands of those garbage connections, SFS will shut them down automagically
Hope it helps
Hello Lapo,
Is there any way to handle disconnection for Unity or AS3?
Re: Re:
CanOncel wrote:Is there any way to handle disconnection for Unity or AS3?
Hi,
your question is too vague, sorry. What does it mean "handling disconnections"?
In which way you want to handle a disconnection?
There's a client side event for that. Unless you're asking for how to reconnect after a connection loss. In which cases I'd recommend reading this: http://docs2x.smartfoxserver.com/Gettin ... n-hrc-plus
cheers
Re: Re:
Lapo wrote:CanOncel wrote:Is there any way to handle disconnection for Unity or AS3?
Hi,
your question is too vague, sorry. What does it mean "handling disconnections"?
In which way you want to handle a disconnection?
There's a client side event for that. Unless you're asking for how to reconnect after a connection loss. In which cases I'd recommend reading this: http://docs2x.smartfoxserver.com/Gettin ... n-hrc-plus
cheers
Hello Lapo,
I tested my program by turning Wi-Fi on/off. I recognize that isConnected() function is still true, when Wi-Fi is turned off. Is there a way of check connection?
On the other hand, I also defined SFSEvent.CONNECTION_LOST, but when Wi-Fi is turned off, the callback is not called.
Re: when users pull the plug
Turning off the Wifi does not close your connections. This has nothing to do with SmartFox, it's how TCP works.
We ha discussed this many times:
viewtopic.php?f=18&t=18224&p=79511
viewtopic.php?f=18&t=18743&p=81832
For more see also:
http://docs2x.smartfoxserver.com/Gettin ... n-hrc-plus
cheers
We ha discussed this many times:
viewtopic.php?f=18&t=18224&p=79511
viewtopic.php?f=18&t=18743&p=81832
For more see also:
http://docs2x.smartfoxserver.com/Gettin ... n-hrc-plus
cheers
Return to “SmartFoxServer 1.x Discussions and Help”
Who is online
Users browsing this forum: Baidu [Spider] and 76 guests