Dynamic configuration of client

Post here your questions about the Objective-C API for SFS2X

Moderators: Lapo, Bax

clam61
Posts: 125
Joined: 12 Sep 2007, 02:00

Dynamic configuration of client

Postby clam61 » 24 Sep 2013, 06:19

Currently I am querying a database for configuration data. This includes the port,zone, and IP of the SFS2x server

I am creating a client

Code: Select all

_smartFox = [[SmartFox2XClient alloc] initSmartFoxWithDebugMode:NO delegate:self];
[_smartFox connect:_gameServerUrl port:_gameServerPort];


but there is no way to configure the httpPort, or blueBoxPollingRate

do i have to load a config file from the bundle to configure these options?
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Dynamic configuration of client

Postby Lapo » 25 Sep 2013, 09:24

A few releases ago we added to the API a new method for connecting called connectWithConfig which allows to pass a programmatic configuration:

Code: Select all

ConfigData *cfg = [[[ConfigData alloc] init] autorelease];
cfg.host = @"127..0.0.1";
cfg.port = 9933;
cfg.zone = @"BasicExamples";
cfg.useBlueBox = YES;
   
// Start connection
[smartFox connectWithConfig:cfg];


Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 37 guests