Socket error: null

Post here your questions about the Java client / Android API for SFS2X

Moderators: Lapo, Bax

joecomma
Posts: 1
Joined: 16 Oct 2014, 21:34

Socket error: null

Postby joecomma » 17 Oct 2014, 15:56

I'm having difficulty getting the android examples to work. I've got an sfs2x server set up and running. The flash examples work both on the local server and from my machine. I can also telnet to the server from my machine and successfully connect. For some reason whenever I run the android examples I get the following connection error:

sfs2x.client.core.sockets.TCPSocketLayer - TCPSocketLayer: Socket error: null

I've made sure I'm using the latest api and example code. I've also made sure I'm connecting to the correct server and port. It's the same server and port I use with the flash examples on my local machine and they work fine. I've got JDK1.7 installed on my machine. I'm running Windows 8 64. I get that same message when I run each of the android examples in the simulator.

Any help would be appreciated.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Socket error: null

Postby Lapo » 17 Oct 2014, 16:34

Are you connecting to 127.0.0.1 or localhost?
In Android they won't work. IIRC for the localhost you should use 10.0.0.2

Are there any other details in the exception?

thanks
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Java / Android API”

Who is online

Users browsing this forum: No registered users and 21 guests