问题描述
我正在尝试通过Chrome扩展程序建立一个WebSocket
连接。它的工作一段时间没有任何问题,但是有时它会抛出此错误:
与ws://gfifgelchncooiobpdbhmcpceehcmahb:3001/ndt_protocol
的WebSocket连接失败:
建立连接错误:net :: ERR_NAME_NOT_RESOLVED
从代码角度来看,我猜看起来不错,这是初始化:
NDTjs.prototype.createWebsocket = function (serverProtocol,serverAddress,serverPort,urlPath,protocol) {
var createdWebsocket = new WebSocket(serverProtocol + '://' + serverAddress + ':' + serverPort + urlPath,protocol);
createdWebsocket.binaryType = 'arraybuffer';
return createdWebsocket;
};
因此,非常欢迎您提出关于此处可能出问题的任何建议!谢谢。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)