试图理解websocket.And在一个问题上的结构: HTML有onchange="ConnectSOMEServer(this)
现在,在功能上,代码只是构造URL
var url = "ws://" + serverName +":" +portNumber; abc= new WebSocket(url); SetSomething(abc);
Chrome控制台中出现的错误如下所示。
WebSocket connection to 'ws://somethin-server:6767/' failed: Connection closed before receiving a handshake response
-The Websocket类在dom5.js中
为了了解它在哪里连接到服务器,以及它正在传递用户名(如果有的话),-Unable,我可以找到端口。
-Other服务器也在为它们运行--相同的代码运行良好,只有一台服务器运行良好--它在特定的port.If上显示了上面的错误--我对它的显示很好。
我已经在互联网上搜索过了,但是对于me.Different类型的实现来说,它看起来并不复杂。
谢谢
发布于 2015-03-09 10:30:34
为了了解它在哪里连接到服务器,以及它正在传递用户名(如果有的话),Q.Unable,我可以找到端口。
Ans.Your html page is sending websocket request on a port.So the application should be having a TCP reciever up and running listening on the same port.
Q.Other服务器也在为它们运行--相同的代码运行良好,只有一台服务器运行良好--它在特定的port.If上显示了上面的错误--我对它的显示很好。
Ans.You can not guarantee here just check the ports the other applications TCP reciever might be listening on the same port which shows above is 6767
希望这能有所帮助。
https://stackoverflow.com/questions/26800231
复制相似问题