Closed SuperXFan closed 6 years ago
Node does not have a WebSocket
class on the global namespace (like in the browser), so you have to use a module like ws
and pass that as the class.
See example
I'm getting this error on iOS 9, which AFAIK supports WebSocket since iOS 6.
https://caniuse.com/#search=websocket
Edit:
So we've made more tests and it is definitely a problem with reconnecting-websocket
.
Web sockets work great on iOS 9.3.
WKWebView:
Safari:
Please check with latest version, if the problem persists, please open a new issue
in nodejs const ReconnectingWebSocket = require('reconnecting-websocket'); let ws = new ReconnectingWebSocket('ws://192.168.90.124:3002/ws');
then Error: No valid WebSocket class provided