I'm trying to mod a game but the websocket says name not resolved even though it looks like it should work. Can someone tell me the problem?
function doit() {
document.body.innerHTML += '<div id="messageDisplay"></div>';
messageDisplay = document.getElementById("messageDisplay");
y = E.getElementById("canvas");
a = y.getContext("2d");
try {
A.top.location.origin != A.location.origin && ba()
} catch (f) {
ba()
}
y.onmousemove = ua;
y.onmousedown = va;
y.onmouseup = xa;
M = E.getElementById("noCursorLock");
H = E.getElementById("noDrawings");
null != localStorage && (M.checked = "1" == A.localStorage.getItem("noCursorLock") ? !0 : !1, H.checked = "1" == A.localStorage.getItem("noDrawings") ? !0 : !1);
A.onbeforeunload = ya;
y.requestPointerLock = y.requestPointerLock || y.mozRequestPointerLock || y.webkitRequestPointerLock;
y.style.cursor = "none";
La();
//________________
//the main issue V
D || null == u && (u = new WebSocket("ws://s1.cursors.io:443/"), u.binaryType = "arraybuffer", u.onopen = Aa, u.onmessage = Ga, u.onclose =
Ba, u.onerror = Ca);
//______________
setInterval(Q, 50);
setInterval(Ja, 40);
A.requestAnimationFrame(ma)
document.onkeypress = handleKeyboard;
}
by the way, I didn't make this, I just want to fix it.
edit: the error is an error in connection establishment
EDIT 2:So the problem above was fixed but a new one arose. i replaced s1.cursors.io
with 104.27.159.114
but it says VM20349:1898 WebSocket connection to 'ws://104.27.159.114:443/' failed: Error during WebSocket handshake: Unexpected response code: 400
what is wrong now?
It says the name is not resolved, and so it isn't.
% host s1.cursors.io
Host s1.cursors.io not found: 3(NXDOMAIN)
DNS doesn't hold a record for the hostname you are trying to connect to.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.