Can't connect to smartfox server using java client api

Post here all your questions related with SmartFoxServer Java API

Moderators: Lapo, Bax

vsbait
Posts: 7
Joined: 13 Jul 2011, 04:53

Can't connect to smartfox server using java client api

Postby vsbait » 19 Jul 2011, 12:37

Hi,
I am using apis from smartfoxserver api central for java. I have try to connect to sfs with ip=127.0.0.1 and port=9339, but when i connect it gives java exception : socket error:could not establish a connection.
I dont know what is the problem, please help me. Thanks!

Yours faithfully,
vaibhav
kaspi
Posts: 16
Joined: 28 Feb 2009, 01:42

Re: Can't connect to smartfox server using java client api

Postby kaspi » 19 Mar 2012, 19:39

Hello,

I have exactly the same problem, when I try to connect to sfs server from a normal Java class with Main, It works without problem,
BUT when I tried to connect from Android Activity class using the same code It gives me these error :
Socket Error: Could not establish a connection!

I have SFS PRO 1.6.9 in Mac OS. I tested with Android 2.1 and Android 3.0 with the same error.

Can anyone give us help plz
ThomasLund
Posts: 1297
Joined: 14 Mar 2008, 07:52
Location: Sweden

Re: Can't connect to smartfox server using java client api

Postby ThomasLund » 20 Mar 2012, 13:36

Hey guys,

I cant help on the older SFS Java API. But did you try to look at some of the hints given in the Android tutorials for 2x?

http://docs2x.smartfoxserver.com/Exampl ... /connector

Maybe some of the ipv6 things are biting you

/Thomas
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Can't connect to smartfox server using java client api

Postby Lapo » 20 Mar 2012, 16:15

Cab you please show the entire stack trace of the error? Also, did you try the examples coming with the API? Do they work for you?
Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “Java2SE / Android Client API”

Who is online

Users browsing this forum: No registered users and 5 guests