Connecting failed !

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
faisal007
Posts: 37
Joined: 27 Sep 2016, 09:01

Connecting failed !

Postby faisal007 » 18 Jul 2017, 17:33

this issue is Occurs when we try to connect sfs server on android device .


in this function:

sfs.AddLogListener(LogLevel.ERROR, OnErrorMessage);
public void OnErrorMessage(BaseEvent evt)

ErrorMessage = " [TCPSocketLayer] Connection error:NO such host is known at "

i am using unity5.5.3 .
Plateform = Android


Note: working fine on webGl and editor.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Connecting failed !

Postby Lapo » 19 Jul 2017, 07:41

Hi,
keep in mind that when using an Android emulator the address of your computer as localhost becomes --> 10.0.2.2, instead of the usual 127.0.0.1

This is because the phone itself (via the emulator) becomes 127.0.0.1, but SmartFoxServer runs on your computer, not the emulator.
For more see this:
https://stackoverflow.com/questions/218 ... -localhost

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

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Google [Bot] and 69 guests