使用socket.io连接到节点后端时,浏览器Websocket客户端错误(opcod -1)

时间:2018-08-07 09:18:10

标签: google-chrome websocket socket.io

const sock = new WebSocket('ws://127.0.0.1:3000/'); 

在chrome中给我opcode -1错误。

服务器运行node和socket.io。如果我使用socket.io-client,效果很好,但是我想使用本机浏览器套接字实现。

enter image description here

enter image description here

0 个答案:

没有答案