I made a chat for a site hosted with o2switch, the chat work perfectly in local, but when hosted, impossible to connect it.
I tried to write the address by many possibility, launch the webserver on differents ports.
Here the way to launch server in php:
protected function execute(InputInterface $input, OutputInterface $output)
{
$server = IoServer::factory(
new HttpServer(new WsServer(new Chat())),
8083
);
$server->run();
}
Here the connection in JS:
var ws = new WebSocket('ws://www.namesite.com:8083');
Error message :
Firefox can't establish a connection to the server at ws://www.namesite.com:8083