dspx15491 2019-06-03 09:40
浏览 201

与websocket在本地工作但无法在服务器上连接聊天

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

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥88 实在没有想法,需要个思路
    • ¥15 MATLAB报错输入参数太多
    • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
    • ¥15 有赏,i卡绘世画不出
    • ¥15 如何用stata画出文献中常见的安慰剂检验图
    • ¥15 c语言链表结构体数据插入
    • ¥40 使用MATLAB解答线性代数问题
    • ¥15 COCOS的问题COCOS的问题
    • ¥15 FPGA-SRIO初始化失败
    • ¥15 MapReduce实现倒排索引失败