Skip to content
Snippets Groups Projects
Commit bedc9fb1 authored by arshiam2's avatar arshiam2
Browse files

wip

parent f661064a
Branches main
No related tags found
No related merge requests found
......@@ -114,7 +114,6 @@ function getPairings(machines) {
socket.on("message", function(message, rinfo) {
const text = message.toString().split(" ");
if (text[0] === "init") {
// console.log("GOT INIR");
getPairings(machines);
}
if (text[0] === "join") {
......
......@@ -92,13 +92,11 @@ function syn(machineNumberBeingChecked) {
function ack(synIP, address) {
const message = Buffer.from(`ack ${machineNumber}`);
// console.log("ack " + machineNumber + " " + message.toString() )
socket.send(message, 0, message.length, PORT, address, function() {});
}
function synAll() {
Object.keys(connections).forEach(connection => {
// console.log(connection)
syn(connection)
})
}
......@@ -106,7 +104,6 @@ function synAll() {
function sendMessage() {
const message = JSON.stringify(connections);
socket.send(message, 0, message.length, CLI_PORT, CLI_HOST, function() {});
// console.log(connections)
}
function updateTimeStamp(ackMachineNumber) {
......@@ -158,7 +155,6 @@ socket.on("message", function(message, rinfo) {
console.log("")
}
if (text[0] === "check") {
// console.log("GOT check")
ack(text[1], rinfo.address)
}
if (text[0] === "ack") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment