Hi!
How i can reconnect to the server?
i try that:
[code]_sfs.disconnect();
_sfs.connect(IP, GameParametersProxy.instance.port);[/code]
Reconnect to server
-
- Posts: 20
- Joined: 21 Dec 2010, 13:17
Reconnect to server
Last edited by Darkwing Duck on 05 May 2011, 07:53, edited 1 time in total.
-
- Posts: 20
- Joined: 21 Dec 2010, 13:17
Then you need to give it a pause. The disconnection doesn't happen instantaneously. Your reconnection attempt is too fast.
You should at least wait for the disconnection event.
In alternative you can call disconnect to close the previous connection and create a new SmartFox object that you connect to the new IP.
You should at least wait for the disconnection event.
In alternative you can call disconnect to close the previous connection and create a new SmartFox object that you connect to the new IP.
-
- Posts: 20
- Joined: 21 Dec 2010, 13:17
No I don't think so.
Take a look a the stack trace:
The cause of the problem is a SetUserVariables Request. Maybe it happens concurrently with the disconnection because of an OpenSpace event.
You should probably make a more graceful disconnection, where you first turn off OpenSpace and then disconnect the socket.
Take a look a the stack trace:
at flash.net::Socket/writeBytes()
at it.gotoandplay.smartfoxserver::SmartFoxClient/writeToSocket()
at it.gotoandplay.smartfoxserver::SmartFoxClient/send()
at it.gotoandplay.smartfoxserver::SmartFoxClient/setUserVariables()
at com.smartfoxserver.openspace.engine.control::OpenSpaceController/
The cause of the problem is a SetUserVariables Request. Maybe it happens concurrently with the disconnection because of an OpenSpace event.
You should probably make a more graceful disconnection, where you first turn off OpenSpace and then disconnect the socket.
-
- Posts: 20
- Joined: 21 Dec 2010, 13:17
well..
1. how i can turn off the openspace?
2. when this exception is not appear, i see this:
[quote]****************************************************************
Internal error:
The room list is empty!
The client API cannot function properly until the room list is populated.
Please consult the documentation for more infos.
****************************************************************
[Sending]: <msg t='sys'><body action='verChk' r='0'><ver v='157' /></body></msg>
[ RECEIVED ]: <cross-domain-policy><allow-access-from domain='*' to-ports='9339' /></cross-domain-policy>, (len: 91)
[ RECEIVED ]: <msg t='sys'><body action='apiOK' r='0'></body></msg>, (len: 53)
[/quote]
1. how i can turn off the openspace?
2. when this exception is not appear, i see this:
[quote]****************************************************************
Internal error:
The room list is empty!
The client API cannot function properly until the room list is populated.
Please consult the documentation for more infos.
****************************************************************
[Sending]: <msg t='sys'><body action='verChk' r='0'><ver v='157' /></body></msg>
[ RECEIVED ]: <cross-domain-policy><allow-access-from domain='*' to-ports='9339' /></cross-domain-policy>, (len: 91)
[ RECEIVED ]: <msg t='sys'><body action='apiOK' r='0'></body></msg>, (len: 53)
[/quote]
-
- Posts: 5
- Joined: 18 Apr 2011, 07:14
Return to “OpenSpace v2 discussions and help”
Who is online
Users browsing this forum: No registered users and 27 guests