First of all i am not sure whether i should post this on the server side or on the client side. I just have a hunch that this is a client side problem.
My Server version:
SFS2x Ver. 2.6.0
This is my current server configuration (i leave everything as default):
IP: 127.0.0.1
Socket: 9933
Websocket listener is set to its default setting:
127.0.0.1 : 8888
The problem that i am having is every time i would like to access the GameLobby via:
127.0.0.0:8080/GameLobby
It shows me the login page, however i am unable to connect (by pressing the connect button).
I received the following error:
ATTENTION(S)
Connection failed: Is the server running at all?
event.errorMessage() returns with an "undefined" message.
looking at main.js, specifically on the onConnectBtClick() (source as below)
Code: Select all
function onConnectBtClick()
{
// Connect to SFS
// As no parameters are passed, the config object is used
sfs.connect();
// Hide any previous error
$("#errorLb").hide();
// Disable button
enableButton("#connectBt", false);
}
Do i need to explicitly set the client so it open a websocket to the said port (which is 127.0.0.1:8888)
I modified the code below to this:
Code: Select all
function onConnectBtClick()
{
// Connect to SFS
// As no parameters are passed, the config object is used
ws.onopen = function(){
sfs.connect();
// Hide any previous error
$("#errorLb").hide();
// Disable button
enableButton("#connectBt", false);
}
}
where ws is:
Code: Select all
var ws = new WebSocket("ws://127.0.0.1:8888");
however i still have no luck.
Could any one give me a hint? am i missing something here?
thank you for the help.
edited: I already made sure that JS is enabled on my browser.