unity smartfoxserver connection error
up vote
30
down vote
favorite
I'm using Smartfoxserver api on Unity3d, it was working fine before I recovery my macbook, but now gives a connection error as below :
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.TcpClient.Connect (System.Net.IPEndPoint remote_end_point) [0x00000] in <filename unknown>:0
at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress ipAddresses, Int32 port) [0x00000] in <filename unknown>:0
UnityEngine.Debug:Log(Object)
SFS2X_Connect:OnConnection(BaseEvent) (at Assets/SFS2X_Connect.cs:2758)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
SFS2X_Connect:Update() (at Assets/SFS2X_Connect.cs:2764)
here is connection code:
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;
using System.Collections;
using Sfs2X;
using Sfs2X.Core;
public class SFS2X_Connect : MonoBehaviour {
public string Host = "127.0.0.1";
[Tooltip("TCP port listened by the SmartFoxServer 2X instance; used for regular socket connection in all builds except WebGL")]
public int TcpPort = 9933;
[Tooltip("WebSocket port listened by the SmartFoxServer 2X instance; used for in WebGL build only")]
public int WSPort = 8888;
[Tooltip("Name of the SmartFoxServer 2X Zone to join")]
public string Zone = "examplezone";
SmartFox sfs;
sfs = new SmartFox ();
sfs.ThreadSafeMode = false;
sfs.AddEventListener (SFSEvent.CONNECTION, OnConnection);
ConfigData cfg = new ConfigData();
cfg.Host = Host;
cfg.Port = TcpPort;
cfg.Zone = Zone;
sfs.Connect (cfg);
}
I've removed and reimport smartfox.dll but still the same
What can I do?
Note : I create a new project and import smartfoxserver, its connected to server
c# unity3d smartfoxserver
This question had a bounty worth +50
reputation from PrinceOfRavens that ended 5 hours ago. Grace period ends in 18 hours
This question has not received enough attention.
|
show 5 more comments
up vote
30
down vote
favorite
I'm using Smartfoxserver api on Unity3d, it was working fine before I recovery my macbook, but now gives a connection error as below :
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.TcpClient.Connect (System.Net.IPEndPoint remote_end_point) [0x00000] in <filename unknown>:0
at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress ipAddresses, Int32 port) [0x00000] in <filename unknown>:0
UnityEngine.Debug:Log(Object)
SFS2X_Connect:OnConnection(BaseEvent) (at Assets/SFS2X_Connect.cs:2758)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
SFS2X_Connect:Update() (at Assets/SFS2X_Connect.cs:2764)
here is connection code:
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;
using System.Collections;
using Sfs2X;
using Sfs2X.Core;
public class SFS2X_Connect : MonoBehaviour {
public string Host = "127.0.0.1";
[Tooltip("TCP port listened by the SmartFoxServer 2X instance; used for regular socket connection in all builds except WebGL")]
public int TcpPort = 9933;
[Tooltip("WebSocket port listened by the SmartFoxServer 2X instance; used for in WebGL build only")]
public int WSPort = 8888;
[Tooltip("Name of the SmartFoxServer 2X Zone to join")]
public string Zone = "examplezone";
SmartFox sfs;
sfs = new SmartFox ();
sfs.ThreadSafeMode = false;
sfs.AddEventListener (SFSEvent.CONNECTION, OnConnection);
ConfigData cfg = new ConfigData();
cfg.Host = Host;
cfg.Port = TcpPort;
cfg.Zone = Zone;
sfs.Connect (cfg);
}
I've removed and reimport smartfox.dll but still the same
What can I do?
Note : I create a new project and import smartfoxserver, its connected to server
c# unity3d smartfoxserver
This question had a bounty worth +50
reputation from PrinceOfRavens that ended 5 hours ago. Grace period ends in 18 hours
This question has not received enough attention.
1
Normally Socket Connection get refused if no services listening on the specified port, or there is a firewall stopping you. Have you checked them?
– Smartis
Aug 22 '17 at 7:13
@Smartis I added more details to question
– Muhammet Demir
Aug 22 '17 at 9:27
Have you already configured the server with localhost:8080 ? Whats the message if you type./sfs2x-service status
in your terminal?
– Smartis
Aug 22 '17 at 9:41
"the deamon is running"
– Muhammet Demir
Aug 22 '17 at 9:50
Andnetstat -p tcp | grep $PORT
in terminal lists 9933 too? Also please add the constructor ofsfs
to your question.
– Smartis
Aug 22 '17 at 9:53
|
show 5 more comments
up vote
30
down vote
favorite
up vote
30
down vote
favorite
I'm using Smartfoxserver api on Unity3d, it was working fine before I recovery my macbook, but now gives a connection error as below :
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.TcpClient.Connect (System.Net.IPEndPoint remote_end_point) [0x00000] in <filename unknown>:0
at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress ipAddresses, Int32 port) [0x00000] in <filename unknown>:0
UnityEngine.Debug:Log(Object)
SFS2X_Connect:OnConnection(BaseEvent) (at Assets/SFS2X_Connect.cs:2758)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
SFS2X_Connect:Update() (at Assets/SFS2X_Connect.cs:2764)
here is connection code:
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;
using System.Collections;
using Sfs2X;
using Sfs2X.Core;
public class SFS2X_Connect : MonoBehaviour {
public string Host = "127.0.0.1";
[Tooltip("TCP port listened by the SmartFoxServer 2X instance; used for regular socket connection in all builds except WebGL")]
public int TcpPort = 9933;
[Tooltip("WebSocket port listened by the SmartFoxServer 2X instance; used for in WebGL build only")]
public int WSPort = 8888;
[Tooltip("Name of the SmartFoxServer 2X Zone to join")]
public string Zone = "examplezone";
SmartFox sfs;
sfs = new SmartFox ();
sfs.ThreadSafeMode = false;
sfs.AddEventListener (SFSEvent.CONNECTION, OnConnection);
ConfigData cfg = new ConfigData();
cfg.Host = Host;
cfg.Port = TcpPort;
cfg.Zone = Zone;
sfs.Connect (cfg);
}
I've removed and reimport smartfox.dll but still the same
What can I do?
Note : I create a new project and import smartfoxserver, its connected to server
c# unity3d smartfoxserver
I'm using Smartfoxserver api on Unity3d, it was working fine before I recovery my macbook, but now gives a connection error as below :
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.TcpClient.Connect (System.Net.IPEndPoint remote_end_point) [0x00000] in <filename unknown>:0
at System.Net.Sockets.TcpClient.Connect (System.Net.IPAddress ipAddresses, Int32 port) [0x00000] in <filename unknown>:0
UnityEngine.Debug:Log(Object)
SFS2X_Connect:OnConnection(BaseEvent) (at Assets/SFS2X_Connect.cs:2758)
Sfs2X.Core.EventDispatcher:DispatchEvent(BaseEvent)
Sfs2X.SmartFox:ProcessEvents()
SFS2X_Connect:Update() (at Assets/SFS2X_Connect.cs:2764)
here is connection code:
using UnityEngine;
using UnityEngine.Networking;
using UnityEngine.UI;
using System.Collections;
using Sfs2X;
using Sfs2X.Core;
public class SFS2X_Connect : MonoBehaviour {
public string Host = "127.0.0.1";
[Tooltip("TCP port listened by the SmartFoxServer 2X instance; used for regular socket connection in all builds except WebGL")]
public int TcpPort = 9933;
[Tooltip("WebSocket port listened by the SmartFoxServer 2X instance; used for in WebGL build only")]
public int WSPort = 8888;
[Tooltip("Name of the SmartFoxServer 2X Zone to join")]
public string Zone = "examplezone";
SmartFox sfs;
sfs = new SmartFox ();
sfs.ThreadSafeMode = false;
sfs.AddEventListener (SFSEvent.CONNECTION, OnConnection);
ConfigData cfg = new ConfigData();
cfg.Host = Host;
cfg.Port = TcpPort;
cfg.Zone = Zone;
sfs.Connect (cfg);
}
I've removed and reimport smartfox.dll but still the same
What can I do?
Note : I create a new project and import smartfoxserver, its connected to server
c# unity3d smartfoxserver
c# unity3d smartfoxserver
edited Apr 18 at 22:58
asked Aug 19 '17 at 19:57
Muhammet Demir
7072933
7072933
This question had a bounty worth +50
reputation from PrinceOfRavens that ended 5 hours ago. Grace period ends in 18 hours
This question has not received enough attention.
This question had a bounty worth +50
reputation from PrinceOfRavens that ended 5 hours ago. Grace period ends in 18 hours
This question has not received enough attention.
1
Normally Socket Connection get refused if no services listening on the specified port, or there is a firewall stopping you. Have you checked them?
– Smartis
Aug 22 '17 at 7:13
@Smartis I added more details to question
– Muhammet Demir
Aug 22 '17 at 9:27
Have you already configured the server with localhost:8080 ? Whats the message if you type./sfs2x-service status
in your terminal?
– Smartis
Aug 22 '17 at 9:41
"the deamon is running"
– Muhammet Demir
Aug 22 '17 at 9:50
Andnetstat -p tcp | grep $PORT
in terminal lists 9933 too? Also please add the constructor ofsfs
to your question.
– Smartis
Aug 22 '17 at 9:53
|
show 5 more comments
1
Normally Socket Connection get refused if no services listening on the specified port, or there is a firewall stopping you. Have you checked them?
– Smartis
Aug 22 '17 at 7:13
@Smartis I added more details to question
– Muhammet Demir
Aug 22 '17 at 9:27
Have you already configured the server with localhost:8080 ? Whats the message if you type./sfs2x-service status
in your terminal?
– Smartis
Aug 22 '17 at 9:41
"the deamon is running"
– Muhammet Demir
Aug 22 '17 at 9:50
Andnetstat -p tcp | grep $PORT
in terminal lists 9933 too? Also please add the constructor ofsfs
to your question.
– Smartis
Aug 22 '17 at 9:53
1
1
Normally Socket Connection get refused if no services listening on the specified port, or there is a firewall stopping you. Have you checked them?
– Smartis
Aug 22 '17 at 7:13
Normally Socket Connection get refused if no services listening on the specified port, or there is a firewall stopping you. Have you checked them?
– Smartis
Aug 22 '17 at 7:13
@Smartis I added more details to question
– Muhammet Demir
Aug 22 '17 at 9:27
@Smartis I added more details to question
– Muhammet Demir
Aug 22 '17 at 9:27
Have you already configured the server with localhost:8080 ? Whats the message if you type
./sfs2x-service status
in your terminal?– Smartis
Aug 22 '17 at 9:41
Have you already configured the server with localhost:8080 ? Whats the message if you type
./sfs2x-service status
in your terminal?– Smartis
Aug 22 '17 at 9:41
"the deamon is running"
– Muhammet Demir
Aug 22 '17 at 9:50
"the deamon is running"
– Muhammet Demir
Aug 22 '17 at 9:50
And
netstat -p tcp | grep $PORT
in terminal lists 9933 too? Also please add the constructor of sfs
to your question.– Smartis
Aug 22 '17 at 9:53
And
netstat -p tcp | grep $PORT
in terminal lists 9933 too? Also please add the constructor of sfs
to your question.– Smartis
Aug 22 '17 at 9:53
|
show 5 more comments
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45775780%2funity-smartfoxserver-connection-error%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Normally Socket Connection get refused if no services listening on the specified port, or there is a firewall stopping you. Have you checked them?
– Smartis
Aug 22 '17 at 7:13
@Smartis I added more details to question
– Muhammet Demir
Aug 22 '17 at 9:27
Have you already configured the server with localhost:8080 ? Whats the message if you type
./sfs2x-service status
in your terminal?– Smartis
Aug 22 '17 at 9:41
"the deamon is running"
– Muhammet Demir
Aug 22 '17 at 9:50
And
netstat -p tcp | grep $PORT
in terminal lists 9933 too? Also please add the constructor ofsfs
to your question.– Smartis
Aug 22 '17 at 9:53