Hi,
We are experiencing problems with connecting to the SmartFox server from certain computers,
It seems that the socket connection timeout is 5 seconds in the SmartFox AS3 API and cannot be configured like regular socket objects in AS3 (http://helpx.adobe.com/flash/kb/flash-p ... ction.html)
Is it possible to change the timeout of the socket?
It is crucial since we believe that the computers which experience these problems would be able to connect had the timeout been longer (and thus allowing the computers more time to connect)
Thank you in advance.
Socket connection timeout problem
-
- Posts: 9
- Joined: 01 Apr 2014, 10:59
Re: Socket connection timeout problem
Since Flash Player 10, Adobe has added a way to control the socket timeout.
http://help.adobe.com/en_US/FlashPlatfo ... ml#timeout
You can try adding this line of code after the instantiation of the SmartFox class:
The value is expressed in milliseconds, according to Adobe's doc the default is 20 seconds. I wouldn't recommend using values < 3-4 seconds.
http://help.adobe.com/en_US/FlashPlatfo ... ml#timeout
You can try adding this line of code after the instantiation of the SmartFox class:
Code: Select all
import com.smartfoxserver.v2.kernel;
...
var sfs:SmartFox = new SmartFox()
sfs.kernel::socketEngine.socket.timeout = 5000
The value is expressed in milliseconds, according to Adobe's doc the default is 20 seconds. I wouldn't recommend using values < 3-4 seconds.
-
- Posts: 9
- Joined: 01 Apr 2014, 10:59
Re: Socket connection timeout problem
Thank you, Lapo
Re: Socket connection timeout problem
Guys,
Hope you are doing well.
Anybody solved this issue ?
I want to handle it in Unity Game.
Please guys give me a help.
Thanks,
Hope you are doing well.
Anybody solved this issue ?
I want to handle it in Unity Game.
Please guys give me a help.
Thanks,
Re: Socket connection timeout problem
Then please start a new thread in the Unity section and explain what is the problem exactly and what API version you're using.
Thanks
Thanks
-
- Posts: 16
- Joined: 09 Jun 2021, 07:23
Re: Socket connection timeout problem
@lapo how can we specify the connection timeout in SFS Java Client?
We are observing that the players are keep on trying to connect to the server internally for a very long time and eventually disconnects.
We want to explicitly drop the connection when the user is not connected within X secs and try again.
Please help!
We are observing that the players are keep on trying to connect to the server internally for a very long time and eventually disconnects.
We want to explicitly drop the connection when the user is not connected within X secs and try again.
Please help!
Re: Socket connection timeout problem
@shahidbits2012: I've already replied to your other topic, let's keep the conversation in one place.
Return to “SFS2X ActionScript 3 API”
Who is online
Users browsing this forum: No registered users and 18 guests