Expo app not connecting to socket server, socket.connected
is always false
I have tried to downgrade socket.io-client
version but it doesn't help. This is the version of socket client:
"socket.io-client": "^2.1.1",
const io = require('socket.io-client');
const ROOT_URL = 'ws://mysocketURl/socket.io/';
var socket = io(ROOT_URL, {
transports: ['websocket'],
jsonp: false,
forceNew: true,
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…