Trying to run the iOS Build. Not connecting to server!!

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

Moderators: Lapo, Bax

Post Reply
JuliusBtesh
Posts: 58
Joined: 30 Sep 2014, 17:08

Trying to run the iOS Build. Not connecting to server!!

Post by JuliusBtesh »

I have been using SFS2X for a bit now with my Unity project and have had no problems with connections using the Editor but now that I am trying to run the game through an iDevice, I am getting this error:

Code: Select all

[SFS - ERROR] TCPSocketLayer: Connection error: Connection refused   at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.Connect (System.Net.IPAddress address, Int32 port) [0x00000] in <filename unknown>:0 
  at Sfs2X.Core.Sockets.TCPSocketLayer.ConnectThread () [0x00000] in <filename unknown>:0 
[SFS - DEBUG] [ BB-Connect ]: http://127.0.0.1:8080/BlueBox/BlueBox.do
[SFS - DEBUG] [ BB-Send ]: null|connect|null
[SFS - ERROR] ## BlueBox Error: Http error creating http connection: System.Net.Sockets.SocketException: Connection refused
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.Connect (System.Net.IPAddress address, Int32 port) [0x00000] in <filename unknown>:0 
  at Sfs2X.Http.SFSWebClient.UploadValuesAsync (System.Uri uri, System.String paramName, System.String encodedData) [0x00000] in <filename unknown>:0 
[SFS - DEBUG] [ BB-Connect ]: http://127.0.0.1:8080/BlueBox/BlueBox.do
[SFS - DEBUG] [ BB-Send ]: null|connect|null
[SFS - ERROR] ## BlueBox Error: Http error creating http connection: System.Net.Sockets.SocketException: Connection refused
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.Connect (System.Net.IPAddress address, Int32 port) [0x00000] in <filename unknown>:0 
  at Sfs2X.Http.SFSWebClient.UploadValuesAsync (System.Uri uri, System.String paramName, System.String encodedData) [0x00000] in <filename unknown>:0 
[SFS - DEBUG] [ BB-Connect ]: http://127.0.0.1:8080/BlueBox/BlueBox.do
[SFS - DEBUG] [ BB-Send ]: null|connect|null
[SFS - ERROR] ## BlueBox Error: Http error creating http connection: System.Net.Sockets.SocketException: Connection refused
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP, Boolean requireSocketPolicy) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP) [0x00000] in <filename unknown>:0 
  at System.Net.Sockets.Socket.Connect (System.Net.IPAddress address, Int32 port) [0x00000] in <filename unknown>:0 
  at Sfs2X.Http.SFSWebClient.UploadValuesAsync (System.Uri uri, System.String paramName, System.String encodedData) [0x00000] in <filename unknown>:0 
Failled connecting to server
What am I doing wrong?

Thank you!
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Trying to run the iOS Build. Not connecting to server!!

Post by Lapo »

You're connecting to 127.0.0.1 which corresponds to the localhost. Which means the device is expecting to find SmartFoxServer running on itself :)
You need to point to the address of your machine, where SFS2X runs.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
JuliusBtesh
Posts: 58
Joined: 30 Sep 2014, 17:08

Re: Trying to run the iOS Build. Not connecting to server!!

Post by JuliusBtesh »

Wow Thanks!! I can't believe I didn't realize that!
Post Reply