How to tell websocket server to accept incoming connections?
I have started using the websocket php example in http://code.google.com/p/phpwebsocket/ It works pretty well on localhost but unfortunately, no client other than localhost can connect to the websocket server. And w开发者_如何学JAVAhenever I change the path to something like http://10.27.50.25:8787/client.html, it does not let the client to connect. Does anyone have any idea/sample about how to fix it?
Thanks in advance
Could be a crossdomain problem. Modern browsers prevent access to hosts other than the one where the page loaded from. You can get around it by providing JSON as an output then using jQuery Ajax JSON parsing.
精彩评论