前端代码无误的前提下需配置后台服务器相关参数:

1 配置支持websocket,且监听端口号为8083
2 port:1883
3 listener:8083
4 protocol:websockets

相关文章: