I now connect this way after having updated to 1.6 on an application fully working on 1.5 version:
smartConnect = false;
nc.connect(ip, port);
then when the client is succesfully connected, I stop the server and when the client looses the connection I still see the output:
** Socket connection failed. Trying BlueBox **
[ Send ]: connect
Error opening URL "http://xxx.xx.xx.xxx:8080/BlueBox/HttpBox.do"
---> Status received: 404
shouldn't it NOT try to connect to bluebox ?
a part from the fact that bluebox does not work (could you please tell me why?) if I cannot disable bluebox I can't detect no more the client disconnection !!!
help please
smartConnect not working on sfs 1.6
smartConnect = false;
nc.connect(ip, port);
if nc is an instance of SmartFoxClient then you should use:
Code: Select all
nc.smartConnect = false
a part from the fact that bluebox does not work (could you please tell me why?)
Could you please describe the problem and report any errors?
thanks lapo !
I was keeping doin it without because that way I was reading it in the docs.
about the BB the issue is the following.... it Simply does not work and it stops over the message :
** Socket connection failed. Trying BlueBox **
[ Send ]: connect
Error opening URL "http://xxx.xx.xx.xxx:8080/BlueBox/HttpBox.do"
---> Status received: 404
now, the problem is that even if it was working, it seems like the BB tries to connect when the connection gets lost. I now well handle the client disconnection, sending the client a disconnection message and then back to login when the connection goes up again.
This way I cant detect a disconnection because BB gets trigged and keeps the client as if it was in !
thanks for the answer !
amnesya
I was keeping doin it without because that way I was reading it in the docs.
about the BB the issue is the following.... it Simply does not work and it stops over the message :
** Socket connection failed. Trying BlueBox **
[ Send ]: connect
Error opening URL "http://xxx.xx.xx.xxx:8080/BlueBox/HttpBox.do"
---> Status received: 404
now, the problem is that even if it was working, it seems like the BB tries to connect when the connection gets lost. I now well handle the client disconnection, sending the client a disconnection message and then back to login when the connection goes up again.
This way I cant detect a disconnection because BB gets trigged and keeps the client as if it was in !
thanks for the answer !
amnesya
Which API are you using? AS 2.0?
This can happen if:
1) BlueBox is not running on port 8080
2) Port 8080 is blocked by a firewall.
In case #2 you should try running the BB on port 80, which is the best choice.
** Socket connection failed. Trying BlueBox **
[ Send ]: connect
Error opening URL "http://xxx.xx.xx.xxx:8080/BlueBox/HttpBox.do"
This can happen if:
1) BlueBox is not running on port 8080
2) Port 8080 is blocked by a firewall.
In case #2 you should try running the BB on port 80, which is the best choice.
AS 2
OK BLUEBOX is perfectly working !
----------------- BUT NOW ------------------
if I turn bluebox OFF
I have noticed that when my flash client closes connection (by unplugging the DSL cable or by restarting the server) and then the client reconnects, SFS 1.6 does not work properly.
When the client reconnects and performs secure login, it works no more. The client regularly sends the login message (like on 1.5) but the server answers no more (on 1.5 it did).
this problem gets solved if I reload the client (close swf and open it back again), but I need to handle disconnection inside the game without making the player refresh page.
I need to run the client so that when the connection is lost goes to a page "Attempting reconnection" and that when the connection is up again it goest to login page.
And it works, but trying to login again server answers no more !
if I turn bluebox ON
I have noticed that when my flash client closes connection (by unplugging the DSL cable or by restarting the server) I cannot detect disconnection clientside because on connection lost it tryes to connect to bluebox !!!
And obviously having no connection i get :Error opening URL "http://151.44.53.220:8080/BlueBox/HttpBox.do"
how can I intercept this kind of BB disconnection, so that I can show client side disconnection to the player ?
--------------------------------------
any idea for both the problems ?
OK BLUEBOX is perfectly working !
----------------- BUT NOW ------------------
if I turn bluebox OFF
I have noticed that when my flash client closes connection (by unplugging the DSL cable or by restarting the server) and then the client reconnects, SFS 1.6 does not work properly.
When the client reconnects and performs secure login, it works no more. The client regularly sends the login message (like on 1.5) but the server answers no more (on 1.5 it did).
this problem gets solved if I reload the client (close swf and open it back again), but I need to handle disconnection inside the game without making the player refresh page.
I need to run the client so that when the connection is lost goes to a page "Attempting reconnection" and that when the connection is up again it goest to login page.
And it works, but trying to login again server answers no more !
if I turn bluebox ON
I have noticed that when my flash client closes connection (by unplugging the DSL cable or by restarting the server) I cannot detect disconnection clientside because on connection lost it tryes to connect to bluebox !!!
And obviously having no connection i get :Error opening URL "http://151.44.53.220:8080/BlueBox/HttpBox.do"
how can I intercept this kind of BB disconnection, so that I can show client side disconnection to the player ?
--------------------------------------
any idea for both the problems ?
There seems to be a bug in the as2 api. We will update the SmartFoxServer package in the next hours. In the meanwhile you can patch the api by yourself: open the SmartFoxClient.as class and on line 4442 add the following instruction: this.preConnection = false
This should be enough. In case some more changes are required, we will post a message here.
This should be enough. In case some more changes are required, we will post a message here.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Sorry, this is where it should go:
Code: Select all
public function connectionEstablished(ok:Boolean):Void
{
if (ok)
{
clearInterval( socketConnectionTimeoutThread )
this.preConnection = false // <------------------------------
var header:Object = {t:"sys"}
...
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
ok fine, it works now.
I can detect disconnection perfectly like before.
I still got a problem when the client reconnects (in the same swf) after disconnection.
when connection is restarted (without closing swf and reopening it, but inside the same swf), any command like login:
sfs.login(zone, nick, md5),
does NOT work when connection gets established back again.
how can I fix this problem ?
I can detect disconnection perfectly like before.
I still got a problem when the client reconnects (in the same swf) after disconnection.
when connection is restarted (without closing swf and reopening it, but inside the same swf), any command like login:
sfs.login(zone, nick, md5),
does NOT work when connection gets established back again.
how can I fix this problem ?
the api you sent me (thanks by the way) solves the problem of detecting the disconnection (I had already solved the problem before by adding the codeline on line 4421 as you told me)
But still got the other problem !!! could you please help me ?
all disconnection and reconnection handling is impossible this way (read post above to understand the problem)
thanks in advance
amn
But still got the other problem !!! could you please help me ?
all disconnection and reconnection handling is impossible this way (read post above to understand the problem)
thanks in advance
amn
We have tested many of the bundled examples and we don't have any problems at all with connecting and reconnecting within the same SWF instance. (we tested both disconnection and logout)
Maybe this is an issue specific to your application.
For example take the AdvancedChat:
- login with any name
- once inside click EXIT
- you'll get back to the start screen and you'll be able to login again
(we tried also by kicking the user from the admin)
Could you provide a code example that reproduces the issue?
Thanks
Maybe this is an issue specific to your application.
For example take the AdvancedChat:
- login with any name
- once inside click EXIT
- you'll get back to the start screen and you'll be able to login again
(we tried also by kicking the user from the admin)
Could you provide a code example that reproduces the issue?
Thanks
Who is online
Users browsing this forum: No registered users and 20 guests