i use this: var sfs = new SFS2X.SmartFox({UseBlueBox: false});
but I can't remove the 'bluebox' from the connection url to my websocket
remove bluebox from url
Re: remove bluebox from url
First of all, that "UseBlueBox" parameter doesn't exist in the HTML/JS API, so you can delete it.
Then, why are you trying to remove "bluebox" from the connection string? The connection string is internal to the API, and it can't be modified.
Then, why are you trying to remove "bluebox" from the connection string? The connection string is internal to the API, and it can't be modified.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: remove bluebox from url
The problem is that I want to connect to wss://sfox.xxx.com/websocket BUT when I connect the way I said earlier, the url is: wss://sfox.xxx.com/BlueBox/websocket
Re: remove bluebox from url
Why do you want to connect to wss://sfox.xxx.com/websocket?
The connection will fail, because SmartFoxServer won't respond at that address.
The connection will fail, because SmartFoxServer won't respond at that address.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: remove bluebox from url
In order to connect to SFS2X via Javascript you just need to invoke the SmartFox.connect() method.
Please take a look at our "Connector" example in the documentation for more details:
http://docs2x.smartfoxserver.com/ExamplesJS/connector
Cheers
Please take a look at our "Connector" example in the documentation for more details:
http://docs2x.smartfoxserver.com/ExamplesJS/connector
Cheers
Re: remove bluebox from url
wss://sfox.xxx.com/websocket It's just an example, what I mean is that the server I want to connect to is not mine. and the url doesn't have that bluebox in it.
Re: remove bluebox from url
You should follow this tutorial about the connection phase:
http://docs2x.smartfoxserver.com/DevelopmentBasics/connection-phase
You just have to create a configuration object containing the "host" property: this is where you have to enter the IP address or domain name of the server you want to connect to (just "sfox.xxx.com", as per your example). Then pass the configuration object to the SmartFox class constructor (in JavaScript).
Hope this helps.
http://docs2x.smartfoxserver.com/DevelopmentBasics/connection-phase
You just have to create a configuration object containing the "host" property: this is where you have to enter the IP address or domain name of the server you want to connect to (just "sfox.xxx.com", as per your example). Then pass the configuration object to the SmartFox class constructor (in JavaScript).
Hope this helps.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team