'websocket: connection error'

"websocket: connection error"," The operation couldn"t be completed. Connection refused"

the development environment is as follows:
react-native-cli: 2.0.1
react-native: 0.55.1
ask for rescue?

Mar.05,2021

    var m={};//
    var ws = new WebSocket(wsObj.url);
    ws.onopen = function () { //
        ws.send(JSON.stringify(m));
        wsObj.resetHeart();
        if (w1) {
            userList = [];
        }
        console.log(":", wsObj.name);
    };

your connection failed to see if it has been matched successfully with the backend

Menu