Bluebox issue

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

Moderators: Lapo, Bax

efsnet
Posts: 55
Joined: 14 Nov 2013, 20:48

Bluebox issue

Postby efsnet » 18 Mar 2014, 16:46

Hello,

In an attempt to test bluebox functionality I added a rule to my server that blocks communication on port 9933 assuming the bluebox would route the traffic through the open 8080 port.

When a logon is attempted from our wifi to my server, which usually works well, it takes up to 2 minutes for the server to create the session. The rest of the communication occurs very slowly and the client is disconnected before it can fully connect.

The client is the most recent iOS version.

Is there anything I should be modifying config-wise? We're using the defaults in most places.

Thanks,
-Eric
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Bluebox issue

Postby Lapo » 18 Mar 2014, 19:10

Hi,
is the server running in your local network or over the internet?

The initial delay can be normal. The API first attempt a socket connection to 9933 (or whatever port you are using). This will fail but there's no standard as to how much time it could take. It's heavily dependent on the OS own TCP stack timeout configuration.

Once you are connected messages should flow pretty fast, you shouldn't almost be able to tell the difference.
Are you running on a device or iOS simulator?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
efsnet
Posts: 55
Joined: 14 Nov 2013, 20:48

Re: Bluebox issue

Postby efsnet » 18 Mar 2014, 19:23

The server is running on my local machine (osx) and I'm connected to it using an iPhone 4 from our local internal wireless network..
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Bluebox issue

Postby Lapo » 19 Mar 2014, 09:21

NOTE: I have moved the topic in the specific iOS section.
-------------------------------------------------------------------------------------
Thanks.
As I mentioned the initial delay may be normal. To be honest we don't have reports of such slowness when using the BlueBox with iOS so this may indicate that something is happening in your local setup.

Is the wifi signal strength strong enough? If you try to browse the web with the same phone and wifi connection does it respond reasonably fast?
Do you have any errors on the client side while testing the SFS connection?

Have you tried running the same application inside the iPhone emulator, using the same wifi? Does it behave differently?

Also which version of the iOS API are you using? (see the SmartFox2XClient.version property)
Lapo

--

gotoAndPlay()

...addicted to flash games
efsnet
Posts: 55
Joined: 14 Nov 2013, 20:48

Re: Bluebox issue

Postby efsnet » 19 Mar 2014, 15:28

The wifi is pretty strong, web browsing works well.

I don't see any errors other than a warning indicating connection attempt failed:

Code: Select all

2014-03-19 09:46:18.708 tinyhoarders[73787:70b] [SFS - WARN]A connection attempt failed (2)
2014-03-19 09:46:18.708 tinyhoarders[73787:70b] [SFS - WARN]Cannot initialize Socket connection to SFS2X.


Running the inside the emulator works better at times - but there's still a large lag and the client is disconnected about 30 seconds after connecting and entering the game state.

Currently the client is using 1.2.1.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Bluebox issue

Postby Lapo » 19 Mar 2014, 18:24

1.2.1 is from Nov 2013, so not super old. Should be fine.

I've tested the same thing in our local wifi testing in the simulator (iPhone) both under XCode 4 and 5. I am pointing the client to a wrong port (9932) to trigger the BlueBox. The effect is immediate. No delay at all.

My impression is that your firewall may be the cause of the long time to switch from socket to HTTP.
Can you try by not filtering the port via the FW and instead pointing the client to a wrong port? This at least will confirm my suspicion.

I am also curious if it may help with the other problems. Does your firewall also filters http?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
efsnet
Posts: 55
Joined: 14 Nov 2013, 20:48

Re: Bluebox issue

Postby efsnet » 19 Mar 2014, 19:48

I switched the port to an invalid number and the connection occurred much quicker. The client was disconnected shortly after beginning the game though.

The firewall isn't filtering http.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Bluebox issue

Postby Lapo » 24 Mar 2014, 18:22

Any errors after the disconnection?
Is your server online? If so we may try a couple of remote tests to see the problem in action. You can let me know the IP address, port and Zone to use via a PM, if it's okay with you.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X iPhone / iPad / OSX API”

Who is online

Users browsing this forum: No registered users and 22 guests