Page 1 of 1

Can't connect to smartfox server using java client api

Posted: 19 Jul 2011, 12:37
by vsbait
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

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

Posted: 19 Mar 2012, 19:39
by kaspi
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

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

Posted: 20 Mar 2012, 13:36
by ThomasLund
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

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

Posted: 20 Mar 2012, 16:15
by Lapo
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