dongmo3413 2019-04-22 05:15
浏览 92

websocket php angularjs frontend在本地服务器上工作正常,但连接问题

I have creted a websocket in php and I am using angularjs in frontend. My websocket and client connection works well on localhost but when I am trying it to push to a live server it says WebSocket connection to 'ws://IP:8090/php-socket.php' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT. Need help...

I have tried searching many options, I found binding it with 0.0.0.0 which doesn't work as well.

var Affiliate = angular.module('Affiliate', ['ngWebSocket']);
Affiliate.factory('ATP', function ($websocket){
var ws = $websocket("ws://IP:8090/php-socket.php");
}
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 js调用html页面需要隐藏某个按钮
    • ¥15 ads仿真结果在圆图上是怎么读数的
    • ¥20 Cotex M3的调试和程序执行方式是什么样的?
    • ¥20 java项目连接sqlserver时报ssl相关错误
    • ¥15 一道python难题3
    • ¥15 牛顿斯科特系数表表示
    • ¥15 arduino 步进电机
    • ¥20 程序进入HardFault_Handler
    • ¥15 oracle集群安装出bug
    • ¥15 关于#python#的问题:自动化测试