首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Websocket的HandShake异常

Websocket的HandShake异常
EN

Stack Overflow用户
提问于 2014-11-07 11:28:20
回答 1查看 327关注 0票数 1

试图理解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类型的实现来说,它看起来并不复杂。

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 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

希望这能有所帮助。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/26800231

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档