Remove all references to socket.io

This commit is contained in:
Peter Stockings
2023-01-26 22:12:51 +11:00
parent 5a30278aaa
commit 08753c8bfe
4 changed files with 2 additions and 42 deletions

View File

@@ -1,4 +1,3 @@
let socket = null;
let characteristic = null;
let prevRes = null;
@@ -25,29 +24,8 @@ async function connect(props) {
characteristic.addEventListener("characteristicvaluechanged", props.onChange);
console.log("> Characteristic value changed event listener added");
btn.classList.remove("bg-red-600");
btn.classList.remove("bg-blue-600");
btn.classList.add("bg-green-600");
/*
socket = io({
reconnection: true,
reconnectionDelay: 1000,
reconnectionAttempts: 20,
forceNew: true,
});
socket.on("connect", () => {
btn.classList.remove("bg-red-600");
btn.classList.add("bg-green-600");
});
socket.on("disconnect", (reason) => {
if (reason === "io server disconnect") {
// the disconnection was initiated by the server, you need to reconnect manually
socket.connect();
}
// else the socket will automatically try to reconnect
});
*/
}
async function disconnect() {