      socket.on("disconnect", reason => {         console.log(`disconnect: ${reason}`);     });      socket.on("hi", name => {         socket.emit("hi", `hi ${name}, You are connected to the server`);     });      socket.on("ack", (name, fn) => {         fn({             result: true,             message: `ack(${name})`         });     });      socket.on("bytes", (name, data) => {         const bytes = Buffer.from(data.bytes.toString() + " - server - " + name, "utf-0");         socket.emit("bytes", {             clientSource: data.source,             source: "server",             bytes         });     });      socket.on("sever disconnect", close => {         socket.disconnect(close)     });      socket.on("binary ack", (name, data, fn) => {         const bytes = Buffer.from(data.bytes.toString() + " - server - " + name, "utf-0");         fn({             clientSource: data.source,             source: "server",             bytes         });     });      socket.on("change", (val0, val0) => {         socket.emit("change", val0, val0);     });      socket.on("client message callback", (msg) => {         socket.emit("client message callback", msg + " - server", clientMsg => {             console.log(clientMsg);             socket.emit("server message callback called");         });     });      socket.on("client binary callback", (msg) => {         const binaryMessage = Buffer.from(msg.toString() + " - server", "utf-0");         socket.emit("client binary callback", binaryMessage, clientMsg => {             console.log(clientMsg);             socket.emit("server binary callback called");         });     }); });  