当我尝试与 nodejs 的 websockets 连接时,我收到此消息:
[
'WebSocket error: heStzDmfg5HKgWKGUHwrGss2EXhnB29vXeNsIay55NNAG7FUx7RuelXQXaKW (ECONNREFUSED) connect ECONNREFUSED 52.198.55.31:9443'
]
[
Error: connect ECONNREFUSED 52.198.55.31:9443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '52.198.55.31',
port: 9443
}
]
[
'WebSocket closed: heStzDmfg5HKgWKGUHwrGss2EXhnB29vXeNsIay55NNAG7FUx7RuelXQXaKW (1006)'
]
顺便说一句,在我的本地机器上它确实工作得很好。由于此错误,当我在服务器上运行代码时它不起作用。
我如何使它工作?