Can someone explain WebSocketStream to me?
Whenever I try to connect using WebSocketStream and the host doesn't respond, my program inevitably crashes and stops. I'd like to have the program attempt to reconnect without stopping even if an error occurs, but I can't seem to make it work. Does anyone have a solution for this?
error: Uncaught (in promise) ConnectionRefused: 対象のコンピューターによって拒否されたため、接続できませんでした。 (os error 10061)
function webSocketStream_Connection() {
try {
const wss = new WebSocketStream("wss://localhost")
} catch (err) {
setTimeout(() => webSocketStream_Connection(), 5)
}
}
webSocketStream_Connection()error: Uncaught (in promise) ConnectionRefused: 対象のコンピューターによって拒否されたため、接続できませんでした。 (os error 10061)
