One of my client receive [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
when he try connect to zone,
most of my clients didn't have such issue,
anyone can help me?
[SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
Hi,
I need more details to understand.
Is the client able to connect to the server at all? Or does he receive a CONNECTION event with the "success" parameter set to false?
Does your application allow using the BlueBox (HTTP tunnelling), if not I'd recommend enabling it from the client configuration so that users behind a firewall can have better chances of connecting to SmartFoxServer.
Thanks
I need more details to understand.
Is the client able to connect to the server at all? Or does he receive a CONNECTION event with the "success" parameter set to false?
Does your application allow using the BlueBox (HTTP tunnelling), if not I'd recommend enabling it from the client configuration so that users behind a firewall can have better chances of connecting to SmartFoxServer.
Thanks
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
one of my client have connection successful
but when client request StartCoroutine(_sfs.InitCrypto());
server return [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
but when client request StartCoroutine(_sfs.InitCrypto());
server return [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
So you're using encryption?
Can you show us the code you're using for connecting and logging in?
Also I need to see the DEBUG transcript from the Unity console, so that we can see what goes between client and server and the full details of the exception.
Thanks
Can you show us the code you're using for connecting and logging in?
Also I need to see the DEBUG transcript from the Unity console, so that we can see what goes between client and server and the full details of the exception.
Thanks
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
Code: Select all
public void Connect()
{
ConfigData cfg = SmartFoxConnectionSettings.Cfg;
_sfs.Connect(cfg);
}
//----------------------------------------------------------
// Handle connection response from server
//----------------------------------------------------------
public void OnConnection(BaseEvent evt)
{
SmartFoxConnectionSettings.ConnectionSuccess = (bool) evt.Params["success"];
if (SmartFoxConnectionSettings.ConnectionSuccess)
{
Debug.Log("Connection successful!");
StartCoroutine(_sfs.InitCrypto());
}
else
{
_sfs = new SmartFox(true);
_sfs.AddEventListener(SFSEvent.CONNECTION, OnConnection);
_sfs.AddEventListener(SFSEvent.CONNECTION_LOST, OnConnectionLost);
_sfs.AddEventListener(SFSEvent.LOGIN, OnLogin);
_sfs.AddEventListener(SFSEvent.LOGIN_ERROR, OnLoginError);
_sfs.AddEventListener(SFSEvent.LOGOUT, OnLogout);
_sfs.AddEventListener(SFSEvent.ROOM_JOIN, OnJoinRoom);
_sfs.AddEventListener(SFSEvent.EXTENSION_RESPONSE, onExtensionResponse);
_sfs.AddEventListener(SFSEvent.CONNECTION_RESUME, OnConnectionResume);
_sfs.AddEventListener(SFSEvent.CONNECTION_RETRY, OnConnectionRetry);
_sfs.AddEventListener(SFSEvent.CRYPTO_INIT, OnEncryptionInitialized);
// Also register for all debug messages from the API at the given log level
_sfs.AddLogListener(logLevel, OnDebugMessage);
Debug.Log("Not connected (client API v" + _sfs.Version + ")");
}
}
public void OnEncryptionInitialized(BaseEvent evt)
{
if ((bool) evt.Params["success"])
{
// Do login
SmartFoxServer._sfs.Send(new LoginRequest(accountId, accountPassword, zone));
}
else
{
_sfs = new SmartFox(true);
_sfs.AddEventListener(SFSEvent.CONNECTION, OnConnection);
_sfs.AddEventListener(SFSEvent.CONNECTION_LOST, OnConnectionLost);
_sfs.AddEventListener(SFSEvent.LOGIN, OnLogin);
_sfs.AddEventListener(SFSEvent.LOGIN_ERROR, OnLoginError);
_sfs.AddEventListener(SFSEvent.LOGOUT, OnLogout);
_sfs.AddEventListener(SFSEvent.ROOM_JOIN, OnJoinRoom);
_sfs.AddEventListener(SFSEvent.EXTENSION_RESPONSE, onExtensionResponse);
_sfs.AddEventListener(SFSEvent.CONNECTION_RESUME, OnConnectionResume);
_sfs.AddEventListener(SFSEvent.CONNECTION_RETRY, OnConnectionRetry);
_sfs.AddEventListener(SFSEvent.CRYPTO_INIT, OnEncryptionInitialized);
// Also register for all debug messages from the API at the given log level
_sfs.AddLogListener(logLevel, OnDebugMessage);
Debug.Log((string) evt.Params["errorMessage"]);
Debug.Log("Not connected (client API v" + _sfs.Version + ")");
}
}
My client can connect to smartfox, but when fire login request didn't recieve by server.
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
Your code is not working because you are adding the listeners (including the SFSEvent.CONNECTION listener) in the SFSEvent.CONNECTION listener itself. This will never be called.
I suggest to take a look at the "Advanced Connector" example in the Unity 5 examples package available here: http://smartfoxserver.com/download/sfs2x#p=examples
It shows how to deal with the whole connection process, including encryption initialization and login. You can strip the "webgl" related parts (see the conditional compilation instructions) if not needed.
I suggest to take a look at the "Advanced Connector" example in the Unity 5 examples package available here: http://smartfoxserver.com/download/sfs2x#p=examples
It shows how to deal with the whole connection process, including encryption initialization and login. You can strip the "webgl" related parts (see the conditional compilation instructions) if not needed.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
Thanks man, i will try and see
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
I have a problem for my editor,
every time stop my editor will freeze my editor
i follow what new advanced connection that you share to me,
and for windows standalone crash when quit application problem can't fixed?
every time stop my editor will freeze my editor
i follow what new advanced connection that you share to me,
and for windows standalone crash when quit application problem can't fixed?
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
We tested that example in Windows standalone too, and didn't figure any crash.
Can you provide more information?
Can you provide more information?
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
-
- Posts: 1
- Joined: 18 Apr 2017, 06:13
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
Hi There,
I am facing same issue can anyone help me on that
I am facing same issue can anyone help me on that
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
We never got a reply to our message.
If you can share more information on the issue and the steps to reproduce it, we will be glad to help.
If you can share more information on the issue and the steps to reproduce it, we will be glad to help.
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
Hello,
I see the last time this thread was posted to was April and I apologize if this is solved elsewhere but I am having trouble locating it.
I have installed the server on two different Linux machines to make sure I kept getting the same issue and I did.
I have followed the Unity tutorial for the Connector and I can connect with a connection return of success; however, after about 30 seconds, I receive the error message [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side. I am convinced I missed something somewhere that's causing this, either in the SFS setup or on my Linux box.
Any help or direction would be very much appreciated. If you need any additional information, please let me know.
I see the last time this thread was posted to was April and I apologize if this is solved elsewhere but I am having trouble locating it.
I have installed the server on two different Linux machines to make sure I kept getting the same issue and I did.
I have followed the Unity tutorial for the Connector and I can connect with a connection return of success; however, after about 30 seconds, I receive the error message [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side. I am convinced I missed something somewhere that's causing this, either in the SFS setup or on my Linux box.
Any help or direction would be very much appreciated. If you need any additional information, please let me know.
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
One of the server settings is the "Session maximum idle time": if, after a successful connection, you don't send a LoginRequest before that time has passed, the server will automatically disconnect the client.
So what you are experiencing is expected (unless you are already sending the Login request!).
So what you are experiencing is expected (unless you are already sending the Login request!).
Paolo Bax
The SmartFoxServer Team
The SmartFoxServer Team
Re: [SFS - ERROR] [TCPSocketLayer] Connection closed by the remote side
Wow, OK, I feel foolish. Let me just restate it here in case anyone else needs it and so I fully understand.
In the first tutorial for Unity, it is simply connecting to the server and nothing else. Even though you set the zone, you do not actually send any log in information, you are only connecting? Therefore, after the 30 seconds, which is equal to the Session maximum idle time on my server, it disconnects the client from the host side.
Thank you for the fast response.
In the first tutorial for Unity, it is simply connecting to the server and nothing else. Even though you set the zone, you do not actually send any log in information, you are only connecting? Therefore, after the 30 seconds, which is equal to the Session maximum idle time on my server, it disconnects the client from the host side.
Thank you for the fast response.
Who is online
Users browsing this forum: No registered users and 35 guests