I try to connect to the socket using the socket.io-client
but I only get to the console
SocketRocket: In debug mode. Allowing connection to any root cert
I checked different versions of the library and React-Native and nothing happens. I thought that the server address was not correct, but I checked it and it works as it should. I also created Node.js on localhost
, accessed it and everything works, but it does not connect to the remote server.
"socket.io-client": "2.0.4", "react-native": "0.58.3", import SocketIOClient from 'socket.io-client'; componentDidMount() { this.socket = SocketIOClient('wss://bitshares.openledger.info/ws',{ 'force new connection': true, reconnection: true, reconnectionDelay: 10000, reconnectionDelayMax: 60000, reconnectionAttempts: 'Infinity', timeout: 10000, transports: ['websocket'] }); this.socket.connect(); // this.socket.send('123'); this.socket.on('connect', () => { console.log("CONNECTED") }); this.socket.onopen=function(){ console.log("onopen") } }