Unity3d ConnectionProblem

Post here your questions about the Unity / .Net / Mono / Windows 8 / Windows Phone 8 API for SFS2X

Moderators: Lapo, Bax

User avatar
ekrem5353
Posts: 67
Joined: 10 Dec 2015, 15:50

Unity3d ConnectionProblem

Postby ekrem5353 » 04 Jan 2017, 14:33

Hi ,

In my mobile application When I am connecting to smartfox I use the same code with the spacewar example. Which is available on your site. I have been getting complaints that they can not connect to smartfox. If I am not connected with wifi and usually when phone is old I get same error too. After the sfs.Connect(cfg) line onConnection event doesnt come. I go to applications setting and clean app data then it connects again. Is it possible that something stucks in SmartFox object in the static variable or something. it usually connects under 3 seconds but sometimes doesnt. I have samsung note5 I try 100 times it connects every time I try with samsung J5 if I try over and over about third time I get same problem(not wi-fi). I connect and quit application repeat this couple of times then it stucks. after sfs.Connect(cfg) line called. When it stuck it doesnt connect to my game I try connecting different games it connects without problem. is there a configuration on smartfox. It calles sfs.Connect(cfg) onConnect event doesnt happen but if I wait abount couple of minutes later it connects. it timesout and reconnects . and reconnect is like instant.

it is android app on google play

Thanks....
User avatar
Lapo
Site Admin
Posts: 20048
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Unity3d ConnectionProblem

Postby Lapo » 04 Jan 2017, 16:24

I have no idea.
If the "clean app data" solves the problem I think it's due to some other issues, maybe related to the OS.

Cleaning the app data gets rid of preferences and other locally stored data. The client SmartFox API don't not depend on any locally stored data or cache. I think this might be a good question for the Unity team.

Have you tried searching on their forums?
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
ekrem5353
Posts: 67
Joined: 10 Dec 2015, 15:50

Re: Unity3d ConnectionProblem

Postby ekrem5353 » 31 Jan 2017, 09:46

Well I have solved it if anyone has the same problem ( After disconnecting not being able to reconnect to smartfox) I can help.
User avatar
Lapo
Site Admin
Posts: 20048
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Unity3d ConnectionProblem

Postby Lapo » 31 Jan 2017, 09:55

What caused it?
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
ekrem5353
Posts: 67
Joined: 10 Dec 2015, 15:50

Re: Unity3d ConnectionProblem

Postby ekrem5353 » 01 Feb 2017, 07:16

I am not really sure but if we call logout before disconnect we dont have reconnection problem anymore. If we dont, not only it doesnt reconnect but also post requests to php files gets timeout too. Something weird happens with sfs.Disconnect() method. It caused me lots of 1 star on google play.
User avatar
Lapo
Site Admin
Posts: 20048
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Unity3d ConnectionProblem

Postby Lapo » 01 Feb 2017, 09:16

Maybe this is something specific to the Android runtime, but the part about php files suggests other issues, unrelated to SFS.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X C# API”

Who is online

Users browsing this forum: No registered users and 1 guest