Page 1 of 1

Configure API without config.xml file

Posted: 28 Mar 2017, 14:22
by Pippoflash
Hi,
since we use a set of conditions to determine which server, ports, etc. we are going to use, we wouldn't like to maintain a large amount of config files, but centralise everything.
Is it possible to confgure API without using an external XML file?

I.e.:
Configure with XML node/string directly
Configure with single parameters
etc.

Thank you

Re: Configure API without config.xml file

Posted: 28 Mar 2017, 15:14
by Lapo
Yes, via the ConfigData object.
http://docs2x.smartfoxserver.com/api-do ... gData.html

You create one, set all its properties then pass it to the SmartFox.connectWithConfig(...) method

cheers

Re: Configure API without config.xml file

Posted: 28 Mar 2017, 15:37
by Pippoflash
Beautiful, thank you.

Re: Configure API without config.xml file

Posted: 28 Mar 2017, 15:40
by Pippoflash
I could have seen it easily myself in API :) thanks for compensating my lazyness...