Cannot connect to SFS2X without wifi
Cannot connect to SFS2X without wifi
Is this supported? I thought it would be. Maybe I am not doing something correctly?
Re: Cannot connect to SFS2X without wifi
Hi there,
Hmm... Maybe your mobile connection provider's network doesn't support TCP connections?
Are you getting any error on the client? And/or any on the Server?
Can you provide further details of your setup?
Thanks
Hmm... Maybe your mobile connection provider's network doesn't support TCP connections?
Are you getting any error on the client? And/or any on the Server?
Can you provide further details of your setup?
Thanks
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Re: Cannot connect to SFS2X without wifi
I see this:
The function:
is called and of course the smartfox instance is not connected. if TCP is not supported, isn't bluebox supposed to be used automatically?
if I set up blueBox = YES I get
also, when onConnection is called, I try to connect again and it logs:
2013-09-09 19:04:04.525 Test[534:907] [SFS - WARN]A connection attempt is already running
purgeIdleCellConnections: found one to purge conn = 0x1cd5b1e0
purgeIdleCellConnections: found one to purge conn = 0x1cd79230
purgeIdleCellConnections: found one to purge conn = 0x1cdf3940
The function:
Code: Select all
-(void)onConnection:(SFSEvent *)evt
is called and of course the smartfox instance is not connected. if TCP is not supported, isn't bluebox supposed to be used automatically?
if I set up blueBox = YES I get
purgeIdleCellConnections: found one to purge conn = 0x1fd95760
purgeIdleCellConnections: found one to purge conn = 0x1fd94510
purgeIdleCellConnections: found one to purge conn = 0x1fd60500
purgeIdleCellConnections: found one to purge conn = 0x1fd7f9a0
purgeIdleCellConnections: found one to purge conn = 0x1fd7de60
purgeIdleCellConnections: found one to purge conn = 0x1fdf1800
2013-09-09 19:04:04.198 Test[534:907] [SFS - INFO][ BB-Send ]: sfsHttp=null%7Cconnect%7Cnull
Code: Select all
-(void)onConnection:(SFSEvent *)evt {
[self sendNotification:CLEAR_LOADING];
if (_smartFox.isConnected) {
[self login];
}
else {
[self sendNotification:SHOW_ALERT body:@"Could not connect to game server. Trying again..."];
[self connect];
}
}
also, when onConnection is called, I try to connect again and it logs:
2013-09-09 19:04:04.525 Test[534:907] [SFS - WARN]A connection attempt is already running
Re: Cannot connect to SFS2X without wifi
Please make sure that you're running the latest Client API, version 1.1.8, from:
http://www.smartfoxserver.com/download/sfs2x#p=client
http://www.smartfoxserver.com/download/sfs2x#p=client
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Re: Cannot connect to SFS2X without wifi
id rather stick with 1.1.5 for maximum compatibility--does 1.1.5 have the ability to connect without wifi?
1.1.8 is not compatible with iOS 5, right? this is a problem.
1.1.7 -- is that compatible with arm7?
btw this is how i am initializing SFS2X. It is not using blue box even though I am specifying bluebox.
1.1.8 is not compatible with iOS 5, right? this is a problem.
1.1.7 -- is that compatible with arm7?
btw this is how i am initializing SFS2X. It is not using blue box even though I am specifying bluebox.
Code: Select all
-(void)createSFS2x {
_smartFox = [[SmartFox2XClient alloc] initSmartFoxWithDebugMode:YES delegate:self];
_smartFox.useBlueBox = YES;
NSLog(@"%@", [_smartFox version]);
}
Re: Cannot connect to SFS2X without wifi
Hmm, I see that some people are misreading Lapo's post regarding 1.1.8...
When it was first built, the API's developers compiled the v1.1.8 with an iOS 6 SDK, which, of course, made it unable to run on iOS 5.
After this was reported by an User, it was sent to the developers to fix it and I'm pretty sure that the new 1.1.8 version compiled with iOS 5 is already available at http://www.smartfoxserver.com/download/sfs2x#p=client, but I'll call Lapo to confirm this at this topic.
Regarding your BlueBox question, the API will only try a BlueBox connection in case it failed to establish a direct Socket connection, because HTTP is a much slower protocol and it should only be used as a last resort.
Hope this helps
When it was first built, the API's developers compiled the v1.1.8 with an iOS 6 SDK, which, of course, made it unable to run on iOS 5.
After this was reported by an User, it was sent to the developers to fix it and I'm pretty sure that the new 1.1.8 version compiled with iOS 5 is already available at http://www.smartfoxserver.com/download/sfs2x#p=client, but I'll call Lapo to confirm this at this topic.
Regarding your BlueBox question, the API will only try a BlueBox connection in case it failed to establish a direct Socket connection, because HTTP is a much slower protocol and it should only be used as a last resort.
Hope this helps
Skills: SFS Pro, SFS2X, AS2.0/AS3.0, Java, HTML5/CSS3/JS, C#
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Portfolio: https://rjgtav.wordpress.com/
SFS Tutorials: http://sfs-tutor.blogspot.com/ - Discontinued. Some examples may be bugged.
Re: Cannot connect to SFS2X without wifi
lapo's last post in hte 1.1.8 thread was, "I will go back to our developers and let you know. Thanks for posting."
hopefully with 1.1.8 you can connect to smartfox without wifi (have you ever heard of this problem before)
in 1.1.5 when the connection fails onConnection: is called, connected is NO and no attempt to connect via blueBox is made.
in 1.1.5 even if I set useBlueBox = YES before calling connect, no connection is made without wifi.
of course this is all moot if 1.1.8 is compatible with iOS 5.
I will await to hear the status. Thanks.
hopefully with 1.1.8 you can connect to smartfox without wifi (have you ever heard of this problem before)
in 1.1.5 when the connection fails onConnection: is called, connected is NO and no attempt to connect via blueBox is made.
in 1.1.5 even if I set useBlueBox = YES before calling connect, no connection is made without wifi.
of course this is all moot if 1.1.8 is compatible with iOS 5.
I will await to hear the status. Thanks.
Re: Cannot connect to SFS2X without wifi
We have a new release of the version 1.1.8 which is compatible with iOS 5.
You can drop us an email to our support@... email box if you want to try it in advance. It will be out early next week.
You can drop us an email to our support@... email box if you want to try it in advance. It will be out early next week.
Re: Cannot connect to SFS2X without wifi
Is anyone else having this problem or just me? i mean, bluebox for this version does not work. thats a pretty big feature that's missing.
Re: Cannot connect to SFS2X without wifi
rjgtav
You said maybe my provider does not support TCP, but doesnt HTTP run on top of TCP? If I can bring up a webpage that means my provider supports TCP
You said maybe my provider does not support TCP, but doesnt HTTP run on top of TCP? If I can bring up a webpage that means my provider supports TCP
Re: Cannot connect to SFS2X without wifi
clam61 wrote:rjgtav
You said maybe my provider does not support TCP, but doesnt HTTP run on top of TCP? If I can bring up a webpage that means my provider supports TCP
There might be limitations on the port ranges you can use.
To test this you can write a simple test app that opens a TCP socket towards port 9933, SFS2X default port.
The server will accept the connection and it will drop it after a while (20-30 secs) since your app doesn't provide a regular handshake, but this is sufficient to test TCP and see which ports are limited, if any.
thanks
Re: Cannot connect to SFS2X without wifi
i tried writing a small app to connect via socket
it works over 3G with port 80 as expected but doesnt work with a lot of other standard ports (20,22, etc).
looks like i should just rely on bluebox with a 3g connection, but the problem is that smartfox runs http over 8080, and i cannot access that port either via 3g
should i put smartfox on a subdomain of my main site and run http or the TCP socket over 8080?
it works over 3G with port 80 as expected but doesnt work with a lot of other standard ports (20,22, etc).
looks like i should just rely on bluebox with a 3g connection, but the problem is that smartfox runs http over 8080, and i cannot access that port either via 3g
should i put smartfox on a subdomain of my main site and run http or the TCP socket over 8080?
Re: Cannot connect to SFS2X without wifi
The best idea in this case is to run SmartFoxServer on port 80 and the BlueBox on port 443 (HTTPs)
This way all clients should be able to connect in one way or another.
Thanks
This way all clients should be able to connect in one way or another.
Thanks
Return to “SFS2X iPhone / iPad / OSX API”
Who is online
Users browsing this forum: No registered users and 54 guests