HTML5 Websocket Server

Discussion in 'Server Operation' started by JESUSSAVES, Feb 1, 2014.


    JESUSSAVES New Member

    Hi Everyone,

    Hoping someone might be able to help.

    I have some PHP code to run a HTML5 Websocket Server on my Debian Wheezy ISPConfig 3 setup but not sure what address to use instantiate the server, how to setup a passcode in the server (or if I can avoid using one) and then pass it with Javascript, and in what directory to put the server script on my box.

    		$this->server = new WebSocketServer("tcp://", 'superdupersecretkey');
    Sure I can use my IP address, but which port? Can I use 8080? Do I need to use a different port? Do I then just add it to the /etc/services file and to my router, and i guess tables as well? And in what corresponding directory will it look for my server script?

    Any help would be appreciated!
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You will have to use a port that is not in use yet. Port 8080 is most likely used by ispconfig, so you have to use a different one like 8090 and then open this port in your router. You dont have to add the port to /etc/services.

    JESUSSAVES New Member

    great - that works

    Thanks Till.

    Also it seems to land me in my www directory although I don't know why. This call connected me.

      socket = new WebSocket("ws://99.999.99.9:8090/");

Share This Page